What you need to know about C + + Top 19 new features (with great reviews)

Source: Internet
Author: User

What is C++17?

C++17 (or c++1z) is the informal name of the next revision of the C + + programming language ISO/IEC standard following c++14. C++17 is now fully functional and is on the way to becoming an international standard. Its norm had reached the stage of the draft international standard in March 2017.

C++17 Standardized Charts
Year C + + Standard Official name
1998 ISO/IEC 14,882:1998 C++98
2003 ISO/IEC 14,882:2003 c++03
2011 ISO/IEC 14,882:2011 C++11
2014 ISO/IEC 14,882:2014 C++14
2017 Yet to be determined C++17
By 2020 Yet to be determined C++20
19 new features of C++17
  1. To make Static_assert text information optional

  2. Delete trigraphs

  3. Allow use of TypeName (as an alternative class) in template parameters

  4. New rules from Braced-init-list for automatic derivation

  5. The definition of a nested namespace, for example: Use namespace X::y {...} instead of namespace X {namespace Y {...}}

  6. Properties that allow namespaces and enumerators

  7. New Standard properties: [[[Fallthrough]], [[maybe_unused]] and [[Nodiscard]]

  8. UTF-8 character text

  9. Constant evaluation of all non-type template parameters

  10. Fold Expressions for variable templates

  11. A compile-time static if with the form if constexpr (expression)

  12. A structured binding declaration that now allows auto [A, b] = Gettworeturnvalues ();

  13. Initializers in if and switch statements

  14. In some cases, make sure to copy elision through the compiler (guaranteed copy elision by compilers in some cases)

  15. Some extensions for aligning memory allocations

  16. Template derivation of constructors, allowing std::p Air (5.0, FALSE) instead of std::p air<double,bool> (5.0, FALSE)

  17. inline variables, which allow variables to be defined in the header file

  18. __has_include, allowing the availability of header files to be checked by preprocessor directives

  19. Change the value of __cplusplus to 201703L

From: http://www.masalaanews.com/

Http://www.oschina.net/news/85129/top-19-new-features-of-c17-you-need-to-know

What you need to know about C + + Top 19 new features (with great reviews)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.