Maybe I’ll be boring with this note, but again I need to write that this was another good year for C++!
Here’s a bunch of facts:
- Visual Studio 2015 was released with great support for C++14/17 and even more experimental features.
- Long-awaited GCC 5.0 was released at the beginning of the year.
- C++ gained a huge boost is popularity around July, 3rd stable place in the Tiobe Ranking
- At CppCon 2015 there were some really important announcements made.
- C++17 seems to be just around the corner!
- And one sad news...
See my full report below.
Missing C++11 features
Just for the reference Clang, GCC and Intel Compiler have full support for C++11.
- Visual Studio:
- Update: previously I've listed here 'Atomics in signal handlers' - as missing, but I skipped one note written here by StephanTLavavej - " I previously listed "Atomics in signal handlers" as No, because despite maintaining
's implementation, I didn't know anything about signal handlers. James McNellis, our CRT maintainer, looked into this and determined that it has always worked, going back to our original implementation of in 2012. "
- So, all in all, this feature is working as expected since 2012.
C++14 - core language features
Clang and GCC fully implement C++14.
|Tweak to certain C++ contextual conversions||N3323||3.4||4.9||12||*16|
|Return type deduction for normal functions||N3638||3.4||4.9||14||15|
|Generalized lambda capture (init-capture)||N3648||3.4||4.9||14||15|
|Generic (polymorphic) lambda expressions||N3649||3.4||4.9||14||*16|
|Relaxing requirements on constexpr functions||N3652||3.4||5||-||-|
|Member initializers and aggregates||N3653||3.4||5||-||*16|
|Clarifying memory allocation||N3664||3.4||n/a||-||-|
|Single-quotation-mark as a digit separator||N3781||3.4||4.9||*14||*16|
Changes (from the last year version) marked with a star (*)
Visual Studio 2015: the compiler is getting closer to the full conformance, they’ve implemented Sized deallocation, [[deprecated]] attribute and Single-quotation-mark as a digit separator.
Intel has also made a good progress, they’ve added support for generic lambdas, member initializers and aggregates, [[deprecated]] attribute and Single-quotation-mark as a digit separator.
Obviously most of us are waiting for something big that should happen in relatively short period of time: C++17 should be standardized! Compilers has still some work to do on the full C++11/14 conformance, but most of the features are there for us. Most of the compiler teams actually moved into experimenting with some of the new features.
But what is C++17?
To get the best idea it’s probably best to read “Thoughts about C++17” (PDF)
by Bjarne Stroustrup. He mentioned the tree top priorities:
- Improve support for large-scale projects
- Add support for higher-level concurrency
- Simplify core language use, improve STL
Moreover, C++17 is a major release, so people expect to get something important, not some little updates.
What’s on the list then?
- Modules - n4465, n4466
- Contracts - n4415
- Asio for basic networking - n4478
- A SIMD vector - n4454
- Improved futures - n3857, n3865
- Co-routines - N4402, n4398
- Transactional memory - n4302
- Parallel algorithms - n4409
- Concepts - n3701, n4361
- Concepts in the standard library - n4263
- Ranges - n4128, n4382
- Uniform call syntax - n4474
- Operator dot - n4477
- array_view and string_view - n4480
- Arrays on the stack - n4294
- optional - n4480 - optional
- Fold expressions N4295
- __has_include in preprocessor conditionals P0061R1
- Filesystem - n4099
- plus many more ‘minor’ changes…
Here is a great and detailed overview of what features might be ready for Botond’s C++17: Trip Report: C++ Standards Meeting in Kona, October 2015
Also, the features that won’t be ready will be shipped with C++20 that is planned to be a minor release. C++20 will complete C++17 as C++14 completes C++11.
At CppCon in the keynote presentation, Bjarne made an important announcement: Core guidelines!
Full guidelines can be found at github - isocpp/cppcoreguidelines, here is a quote from the introduction:
The C++ Core Guidelines are a collaborative effort led by Bjarne
Stroustrup, much like the C++ language itself. They are the result of
many person-years of discussion and design across a number of
organizations. Their design encourages general applicability and broad
adoption but they can be freely copied and modified to meet your
The aim of the guidelines is to help people to use modern C++
effectively. By “modern C++” we mean C++11 and C++14 (and soon C++17).
In other words, what would you like your code to look like in 5 years’
time, given that you can start now? In 10 years’ time?
Since the language is getting more complicated, modern, and even simplified at the same time it’s very welcomed to have a guide that will help to write good modern C++ code. Some older rules are now superseded by new approaches - for example RAII. It’s not that easy especially when you’re working on a legacy code and you’d like to add some fresh modern code into your project.
Guidelines are developed collaboratively, so it seems the rules should be practical.
The main keynote from Bjarne:
It was later described with working examples by Herb in his talk:
Notes on the C++ Standard
This year, as expected, there were two meetings: Kona in October and Lenexa in April.
The Fall meeting:
- Herb Sutter’s trip report from the Fall meeting
- STL’s summary reddit post.
- Botond’s trip report - a very detailed report
And here are the links from Spring meetings:
Next meeting are announced, it will be in Jacksonville, Florida in February. Then, there will be a very important meeting in Oulu, Finland at the end of June - important because Draft for C++17 will be voted there.
- C++11/14/17 Features In VS 2015 RTM
- MSDN Support For C++11/14/17 Features (Modern C++)
- Link to the latest version of cpp standard support
- Visual Studio 2015 finally supports constexpr! see this blog post blog post
- Rejuvenating the Microsoft C/C++ Compiler
- MSDN series: Welcome Back to C++ (Modern C++)
- Experimental support:
- Concepts Lite was merged into the main GCC branch, reddit post here
- GCC 5.0 was released
- Current C++1y/C++14 Support in GCC
- Current C++ Support in Clang
- Clang is now used in VisualStudio to provide mltiplatform toolchain. You can also use Clang on the Windows platform. Read more here: Bringing Clang to Windows
- Compiler 16.0 was released in August.
- here’s a Presentation about new features of the 16th version of the compiler (PDF)
- video describing some of the new features at goparallel
- Current C++ Support in Intel Compiler
- C++14 Features Supported by Intel® C++ Compiler
This year two C++ conferences gained my attention: CppCon and MettingCpp.
The first keynote:
And the second one:
Here are some books about C++ that appeared in 2015
Alert! Amazon links below :)
- Discovering Modern C++: An Intensive Course for Scientists, Engineers, and Programmers (C++ In-Depth)
- Real-Time C++: Efficient Object-Oriented and Template Microcontroller Programming
- Exploring the Raspberry Pi 2 with C++
- GCC 5.2 Standard C++ Library Manual
- Using the C++ Standard Template Libraries
- Learning Boost C++ Libraries
- C++ Recipes: A Problem-Solution Approach
My top events for C++ in 2015:
* Core Guidelines announcement
* VS 2015 release
* Lots of experimental features available to play.
As we can see C++ Standardization Committee is working hard to bring us C++17 that really includes huge and important features. At the end of the next year we should be seeing the full C++17 draft accepted.
Developers seem to like the current atmosphere around C++ and it was reflected in the July’s Tiobe Rank, where C++ reached 8%! Maybe the term “C++ renaissance” is not a myth…
What’s even better, we have lots of experimental work already in our compilers. We can play with modules, concepts, ranges, co-routines… This might not be safe for your production code, but definitely it’s great for learning and testing this new stuff. Feedback gained from those early-staged implementation might be very valuable when the final spec is realized. And, I hope, the committee will include that feedback in their work.
VisualStudio team become more open, they’ve done huge improvements with the latest release of VS 2015. Not only you can create multiplafrotm apps (thanks to embedding Clang) but also they are quite fast with new, experimental C++ features.
All compilers implement core parts of C++11/14, so there is no excuse not to write modern C++! With the help of Core Guidelines this task should be much easier. Please add it to your new year’s resolution list! :)
The Sad News
Just a few hours after I published my original post there was a message posted from Scott Meyers on his blog: "} // good to go"... that basically says that Scott Meyers is retiring from the world of C++ ;/
See more fresh comments on this reddit thread: link here
What do you think?
- What do you think about C++ in 2015?
- What was the most important event/news for you?
- Did I miss something? Let me know in comments
Please also vote in my poll below:CodeProject