r/cpp • u/TemplateRex • Jan 11 '17
g++7 is C++17 complete!
https://gcc.gnu.org/projects/cxx-status.html#cxx1z54
u/mtclow Jan 11 '17
Congratulations to the g++ team!
19
u/TemplateRex Jan 11 '17
Is the clang/libc++ team also in a final sprint towards the finish? GitHub activity has been pretty high lately.
3
u/EricWFCpp Libc++ Developer Jan 15 '17 edited Jan 15 '17
Libc++ is getting close to C++17 feature complete (Special math not withstanding). We're just about on pace with libstdc++. The largest missing piece is
std::filesystembut that just requires re-namingstd::experimental::filesystem. See the Libc++ Implementation Status page for more info.2
u/TemplateRex Jan 15 '17
There is a small error in that table: P0031R0 makes all of
<array>except fill/swap constexpr. The github commit by /u/mtclow/ on Jan 4 left out the front/back/operator[] members.1
u/EricWFCpp Libc++ Developer Jan 15 '17 edited Jan 15 '17
Hopefully /u/mtclow will see this. (Otherwise I'll ping in offline).
PS. Always feel free to file a bug report :-D
EDIT: A Bug has been filed
2
1
u/TemplateRex Jan 15 '17
That's good to hear. It would be great to get a c++17 complete Clang 4.0!
Btw, on Linux, libc++ is not a first-class citizen compared to g++7 / libstdc++ (Ubuntu 17.04 pre-release has a ppa) or even Clang++ (the awesome apt.llvm.org nightly builds). Building libc++ from source works but is fragile (linking to g++ compiled Boost packages does not always work). It would be nice if there would be a regularly built libc++ package that works nicely with Boost.
2
u/EricWFCpp Libc++ Developer Jan 15 '17
I hear you! The first step is getting libc++ included in the nightly LLVM packages. Unfortunately using libc++ with g++ is always going to be fragile. Not a lot of software packages are configured to handle it.
1
u/TemplateRex Jan 15 '17
Great to hear people are considering doing nightly libc++ builds. I figure that in the LLVM/Boost/Ubuntu maintainers triangle, there is a pair of overlapping persons in every link, so coordinating that the Boost packages get correctly built for both g++ and clang should be straightforward :)
5
u/datosh Jan 12 '17
Probably has been pretty high, because they are about to release version 4.0 I think due to today. After this release the naming for future releases will also change. Next version will be 5.0
2
19
u/theICEBear_dk Jan 11 '17 edited Jan 12 '17
Congratulations to the GCC C++ team including their library team because they are also advancing at a good clip. Filesystem and Parallelism TS implementation/integration are the major missing parts there.
Clang/LLVM is close too (although I haven't checked on their library in a few months).
I recently moved an embedded project over from Gcc 4.4.1 onto Gcc 6.2 and saved 51 kb in code size while passing an exhaustive test suite and real-time testing in the first try. At this point quality is so good the actual switching of release versions usually just reveals a few new warnings or errors that we fix and then we fire it off to our test systems (a full run takes a few days).
5
u/wrosecrans graphics and network things Jan 11 '17
What sort of app is it that a full test run takes a few days? That sounds interesting.
11
u/lurkotato Jan 12 '17
Probably stress testing. God knows how many bugs the "Repeat this a million times and then ship the log to the hardware guys" tests have uncovered.
3
u/theICEBear_dk Jan 12 '17
I can't go into details. But it is a cooling system that must run 24/7 when in use and uses very complex algorithms. It is for shipping containers.
14
u/tcbrindle Flux Jan 11 '17
Fantastic news. For reference, here is the corresponding C++17 status table for libstdc++.
1
6
u/qx7xbku Jan 12 '17
Concepts TS is there. Can't wait for coroutines TS. They seem to be doing amazing job.
1
10
4
u/bames53 Jan 11 '17
Nice.
I'm glad to see that SD-6 feature testing stuff is also in there. The intent is to enable better portability, but last I recall checking it was still only supported by one compiler, which kind of defeated the point.
3
u/AndrewPardoe Formerly MSVC tools; no longer EWG scribe Jan 13 '17
Congrats to our friends and colleagues on the GCC/G++ teams!
(I look forward to the day when we can make a similar post!)
4
u/Gotebe Jan 12 '17
I didn't know C++17 was complete?
5
u/seg_faulted_user Jan 12 '17
The standard has yet to be finalized. g++ implementation is subject to change until the final standard is published.
5
3
1
-9
44
u/TemplateRex Jan 11 '17
It appears that the current prelease version of g++7 is C++17 complete. Of course, C++17 itself is not really complete yet, but it is in a feature freeze, waiting national body comments and defect reports. Standard Library support for libstdc++ is also not quite complete. And clang 4.0 SVN is only two features away from completeness. A good start for the year!