Live data from Hacker News

C++17 Standard Published

iso.org

21–30 of 85 posts

Re: C++17 Standard Published

#22
post #6

C++17 is a slight disappointment, I hope C++20 will be the real deal - concepts could really be a game changer and move semantics needs more fixes :/.

It's not as major of an update as previous releases, but there are a lot of little convenience features.

String views, same-line nested namespaces, [[fallthrough]], if with init (I'm sure Google single-handedly got this included; it's very Go-reminiscent and really nice when not using exceptions), structured bindings, maybes with std::optional (occasionally useful), and even just something as simple as emplace returning a reference.

What fixes do you think std::move needs, out of curiosity?

Re: C++17 Standard Published

#23

I can't even imagine the amount of work that goes into producing a specification like this, BUT... I wish there were a reduced price option for individuals. I just can't justify spending USD 200 on getting a copy for myself. I'd love to have a copy so I don't have to rely on second-hand sources like websites and implementation details from STL maintainers on Reddit or Stack Overflow.

When C++11 came out, I bought the ANSI copy (identical to the ISO one except for the front page if I remember correctly) for $30. It sure beat the ISO version in terms of price.

Re: C++17 Standard Published

#25
post #20

Earlier quoted context omitted.

Thanks. I just like having an official (not draft) copy. I'm a nerd. I just built from the LaTeX source and it's 32 pages longer than the public draft in the second link from 6 weeks ago. Maybe just additional descriptive language, but...

Reading https://github.com/cplusplus/draft , it seems you had to generate figures from their dot source. If so, the result may depend on your installation (probably even if you use the same version of GraphViz but a different OS and/or set of fonts), and that can affect pagination. Also, are you sure you built for the same paper size? A4 vs US letter could explain the difference.

Well, you can see changes as recently as two days ago.

https://github.com/cplusplus/draft/commit/83e302d3bb6a5f8855...

Re: C++17 Standard Published

#26
post #6

C++17 is a slight disappointment, I hope C++20 will be the real deal - concepts could really be a game changer and move semantics needs more fixes :/.

It's not as major of an update as previous releases, but there are a lot of little convenience features. String views, same-line nested namespaces, [[fallthrough]], if with init (I'm sure Google single-handedly got this included; it's very Go-reminiscent and really nice when not using exceptions), structured bindings, maybes with std::optional (occasionally useful), and even just something as simple as emplace return…

Its not std::move, but the complexity coming with it. Its a hassle applying move semantics correctly and there is not the one goto solution for simple things. Im not aware of a proposal to change that issue, but at least there should be better defaults.

This talk explains the pain quite well: https://www.youtube.com/watch?v=PNRju6_yn3o

Re: C++17 Standard Published

#27
post #7

Earlier quoted context omitted.

The reduced price option for individuals is that you just look at the last working draft, which is always published for free for all ISO standards and is almost equivalent to the final product. The only reason anyone cares about the officially published standard is if you're a compiler vendor who wants to know for sure that your product is standards compliant, which is why the cost for the no-draft versions is what i…

The almost equivalent is always the scary part. Is there a guarantee that there is no technical difference between the draft and final standard? From your reply, it seems, it is intentionally not specified what exactly are the differences to force compiler vendor to buy the standards. But then the one using a draft is always scared there is one thing different which he has not looked into and this is causing problems…

Non-editorial changes would have to be voted in. This is not an easy process which can happen late.

And mind: It's not only for compiler vendors. An ISO standard is a legal document. Based on your country you might put in your software's contract that your code is compliant C++ code or might consult the standard in a legal debate with a commercial vendor. All quite limited ... but not only compiler vendors.

Re: C++17 Standard Published

#30
post #6

C++17 is a slight disappointment, I hope C++20 will be the real deal - concepts could really be a game changer and move semantics needs more fixes :/.

It's not as major of an update as previous releases, but there are a lot of little convenience features. String views, same-line nested namespaces, [[fallthrough]], if with init (I'm sure Google single-handedly got this included; it's very Go-reminiscent and really nice when not using exceptions), structured bindings, maybes with std::optional (occasionally useful), and even just something as simple as emplace return…

std::move should extend the lifetime of a temporary like static_cast does. (Or else not accept temporaries). Otherwise, no new features necessary. But that one bites sometimes.
Post reply on HN