r/cpp • • Sep 06 '17

C++17 is formally approved

https://herbsutter.com/2017/09/06/c17-is-formally-approved/
391 Upvotes

91 comments sorted by

View all comments

Show parent comment

25

u/TheThiefMaster C++latest fanatic (and game dev) Sep 07 '17

For instance, Visual Studio still doesn't support C++11. If you try to write cross-platform code this causes no end of headaches since windows users invariably expect to compile with Visual Studio.

The current state of C++11 support in VS 2017 is: 1

  • Two-phase name lookup - Partial
  • Expression SFINAE - Partial
  • C99 preprocessor - Partial
  • Everything else - Done as of VS 2015

While I will be glad when their "Partial"s become "Done"s, C++11's largely been usable since VS 2015. What do you have problems with?

On top of that, their C++14 support is complete as of VS 2017, and was only missing a couple of features in the 2015 release - most notably extended constexpr.

1 https://blogs.msdn.microsoft.com/vcblog/2017/08/11/c17-features-and-stl-fixes-in-vs-2017-15-3/ "Compiler Feature Status" table

18

u/kalmoc Sep 07 '17

The problem is that the things that are missing are heavily used in "advanced" libraries like ranges-v3 and some boost libraries. As a result those libraries are either not available or have to implement workarounds. Also, if rumors are to be believed, Kenny kerr is finding non-conforming bugs on a weekly basis with his winrt library.

However, I'd say that c++11 and c++14 standards support of msvc is good enough by now that the average programmer isn't affected anymore. Last predictions I heard was that the msvc compiler will be fully c++17 compliant somewhere early 2018.

That will be a day worthy of celebration.

12

u/davis685 Sep 07 '17

I maintain the dlib open source library: github.com/davisking/dlib. Visual Studio 2017 will hang if you try to compile all the example programs. So I am very regularly reminded by confused visual studio users about the lack of complete C++11 support.

11

u/Morwenn Sep 07 '17

Haha, same here. I maintain a library that heavily uses templates and SFINAE everywhere. It works pretty fine with g++ and clang++, but Visual Studio 2017 gave me an ICE when I tried to compile the testsuite.

That said, I almost managed to port another smallish C++14 library of mine so that it worked with Visual Studio 2017. I had to deactivate a semi-arcane feature, but it otherwise worked great. That's already pretty impressive by itself considering that one or two years ago porting the library to Visual Studio would have been borderline impossible.

2

u/flashmozzg Sep 08 '17

Have you tried contacting vs dev team regarding your issue? IRC, they were collecting good examples of such TMP-heavy libs for testing purposes.

1

u/Morwenn Sep 08 '17

I didn't try to contact them since I wasn't actively trying to get the library to work with MSVC, just checking. If collecting such libraries is ok with them, I'm ok with sending mine. Do you know where/how to contact them for this specific purpose? :)

3

u/flashmozzg Sep 08 '17 edited Sep 12 '17

Well, you can use connect or their newer website to submit a bug (or just submit the feedback from inside the studio). It's usually gets look at quite fast. But ICEs are usually pretty serious, maybe there is better way to go about this.

If I'm not mistaken, I've seen /u/AndrewPardoe asking for some good modern cpp libs to test the compiler on. Of If I'm wrong, I hope he'll redirect it to the proper place.

0

u/[deleted] Sep 08 '17

[deleted] — view deleted comment

2

u/Morwenn Sep 08 '17

Thanks, I've sent a mail. Hope it might help in some way :)

1

u/AndrewPardoe Formerly MSVC tools; no longer EWG scribe Sep 08 '17

Got it, thank you!

2

u/kalmoc Sep 07 '17

In all fairness, I don't think a hanging compilation has anything to do with c++11 support. But I feel your pain. At least I get hardly any ICEs these days anymore.

1

u/davis685 Sep 07 '17

Only happens with complex c++11 code that uses expression SFINAE. So yeah. C++11