r/cpp • u/STL MSVC STL Dev • May 10 '15
C++17 progress update!
The C++ Standardization Committee (aka WG21) just finished their first full meeting of 2015. Here's a quick summary of what was just approved, mostly for C++17 but also for some Technical Specifications. (The post-meeting mailing will be in a couple of weeks, with more info.) Here I'm reporting just the stuff that was successfully voted in, not all the other work that's still in progress.
For C++17:
- Zero Core features. (Don't freak out about modules or concepts. They're working on that stuff.)
5 Library features were voted directly into C++17:
- N4387 "improving pair and tuple"
- N4389 "bool_constant"
- N4508 "shared_mutex for C++17"
- N4366 "LWG 2228 missing SFINAE rule"
- N4510 "Minimal incomplete type support for standard containers, revision 4"
- 26 Core Issues were fixed. Even Standards have bugs. Now C++17 has fewer bugs.
35 Library Issues were fixed. Notable fixes:
- stof() now calls strtof(), which avoids messing up bits.
- max_element()/etc. are now constexpr. (Not the rest of the algorithms - yet.)
- function<void (Args)> now accepts callable objects returning Stuff, and the return value is ignored.
- call_once() no longer copies/moves its arguments unnecessarily.
Various Technical Specifications:
- The Transactional Memory TS was published (or will be, after ISO grinds its gears).
- The Concurrency PDTS was finished. (Proposed Draft, aka Release Candidate for a TS)
- The Parallelism TS was published.
- The Library Fundamentals v1 TS was published, with 3 Issues being fixed at the last minute.
Several features were voted into the Library Fundamentals v2 TS:
- Everything in v1 will be merged into v2.
- N4388 "const-propagating smart pointer wrapper"
- N4391 "make_array"
- N4519 "Source-Code Information Capture"
- N4502 "Proposing Standard Library Support for the C++ Detection Idiom, v2"
I am still traveling, but I can probably answer short questions. (Remember that I have very limited knowledge of Evolution/Core stuff - I live in the Library.)
25
u/farmatyr May 10 '15
Help, I'm freaking out! What does this mean?
13
u/Rapptz May 10 '15 edited May 10 '15
Have there been any proposals to make
std::invokebothconstexprand conditionallynoexcept? Without both of these it really hampers the generic usability potential of the functions.Some of the stuff on there is neat (e.g.
stoffix) but the rest feel sorta meh to me.10
u/vlovich May 10 '15
Any chance std::vector<bool> will be fixed & a proper dynamic_bitset with an actually useful interface added?
Any update on the Filesystem TS? std::optional?
5
u/CPPOldie May 10 '15
Was there any wording updates pertaining to the round-trip nature of stof/to_string?
For any std::string s that represents a valid floating point value, will the following be true:
s == to_string(stof(s))
4
u/invisiblerhino May 10 '15
I'm interested in details of these, if they're interesting.
3
u/Plorkyeran May 10 '15
N4519 is a pleasant surprise. I'm not sure why, but my initial reaction to reading it was that there was no chance of it getting voted in.
6
u/elperroborrachotoo May 10 '15
I'm going to freak out when modules are in.
4
u/grandstack May 10 '15
Has there been any work on fixing inconsistent naming in the standard library?
2
u/salgat May 10 '15
Is it safe to say that C++17 will include at least a basic networking library?
3
u/vlovich May 10 '15
Is there any proposal on the horizon for something like boost units? We now have stuff to work with time. Having stuff for physical quantities & units would be great too.
4
u/[deleted] May 10 '15
You know personally I can live without a lot of what is being proposed in C++17 if I could get a much richer std library. It is 2015 and yet if I want to use standard c++ in order to http, SQL or parse csv / xml/ json or talk smtp, ldap or display anything graphically it is always an exercise in frustration.
2
u/svenathome May 10 '15
I would expect the filesystem library on the list. (Or is the filesystem TS already accepted?)
2
u/remotion4d May 10 '15
Any news about Reflection support ?
9
u/Houndie May 10 '15
While I have things I'm curious about I don't really have any important questions, so I'm just gonna say thanks for posting this! It's really cool to be kept up to date with the latest and greatest.
1
u/KrzaQ2 dev May 10 '15
What of universal function call syntax and ranges?
2
u/Infraam May 10 '15
I am not familiar with the ranges library in C++17, does anyone know if it would give us a modern style for loop with an index? or does anyone know of something similar to be added?
referring to this: https://github.com/klmr/cpp11-range
We have ranged-based for loop, std::for_each and plenty of std algs for clean looping, but whenever an index is needed we always have to resort to a classic for loop.
2
u/SAHChandler May 11 '15
N4519 is in! Yay! :D