For C++17 everyone wanted to have concepts, and as you know, we didn’t get them. But does it mean C++17 doesn’t improve templates/template meta-programming? Far from that! In my opinion, we get excellent features.
Read more for details.
Intro Do you work a lot with templates and meta-programming?
With C++17 we get a few nice improvements: some are quite small, but also there are notable features as well!
In May 2017 we got one more book about Modern C++! A Few weeks ago I got a copy from Packt Publishing, and today I’d like to write a few words about the book. In short: it’s a very good book! :)
But let’s see what’s inside…
The Book < a href=“http://amzn.
The second part of my series about C++17 details. Today I’d like to focus on features that clarify some tricky parts of the language. For example copy elision and expression evaluation order.
Intro You all know this… C++ is a very complex language, and some (or most? :)) parts are quite confusing.
The new C++ Standard - C++17 - is near the end to be accepted and published. There’s already a working draft, and not that long ago it went to the final ISO balloting. It’s a good occasion to learn and understand what are the new features.
Let’s start slowly, and today we’ll look at language/library fixes and removed elements.
As you’ve might already notice I’ve made a little joke on Saturday, which was the April Fools’ Day. I got the courage to announce C++18 next year! :)
While it was a bit funny, I didn’t expect much traffic (as it was Saturday). Still, my stats shows that a lot of people clicked and viewed the post.
I have a great news! During the last meeting in Kona, the committee not only made final notes on the C++17 standard! There’s also a groundbreaking news that behind the curtains they planned C++18!
Disclaimer/Note: this was just an April Fool’s joke! :). Please read the follow-up here!
Intro As it appears, the C++ Cometee finally understood that C++17 doesn’t contain the features everyone wanted.
Have you seen my recent blog post with the list of C++17 features? Probably this is not the best measurement, but it got only ~30% of the average read (while other articles might get like 70, or even 90%). I am not complaining, the list is crazy and contains probably too many details of the new standard.
This year we’ll get a new version of C++: C++17!
In this mega long article I’ve built a list of all features of the new standard.
Have a look and see what we get!
Intro Language Features New auto rules for direct-list-initialization static_assert with no message typename in a template template parameter Removing trigraphs Nested namespace definition Attributes for namespaces and enumerators u8 character literals Allow constant evaluation for all non-type template arguments Fold Expressions Unary fold expressions and empty parameter packs Remove Deprecated Use of the register Keyword Remove Deprecated operator++(bool) Removing Deprecated Exception Specifications from C++17 Make exception specifications part of the type system Aggregate initialization of classes with base classes Lambda capture of *this Using attribute namespaces without repetition Dynamic memory allocation for over-aligned data __has_include in preprocessor conditionals Template argument deduction for class templates Non-type template parameters with auto type Guaranteed copy elision New specification for inheriting constructors (DR1941 et al) Direct-list-initialization of enumerations Stricter expression evaluation order constexpr lambda expressions Different begin and end types in range-based for [[fallthrough]] attribute [[nodiscard]] attribute [[maybe_unused]] attribute Ignore unknown attributes Pack expansions in using-declarations Structured Binding Declarations Hexadecimal floating-point literals init-statements for if and switch Inline variables DR: Matching of template template-arguments excludes compatible templates std::uncaught_exceptions() constexpr if-statements SFINAE Tag dispatching if constexpr Library Features Merged: The Library Fundamentals 1 TS (most parts) Removal of some deprecated types and functions, including std::auto_ptr, std::random_shuffle, and old function adaptors Merged: The Parallelism TS, a.
Another year and another C++ Status! It’s hard to believe, but it’s my fifth time I am writing this summary. And, as usually, C++ language is very alive. The biggest news for the year?
Of course, it must be: the final draft for C++17!.
What else have happened? See my full report below.
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.