Rahul Sharma (Editor)

C 17

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

C++17 (also called C++1z) is the informal name for the future revision of the C++ ISO/IEC standard. The specification for the C++17 revision is under development and feature-complete, to be finished in 2017. See also n4606 working draft and the n4618 working draft.

Contents

Expected features

  • Addition of a default text message for static_assert
  • Addition of std::string_view, a non-owning reference to a character sequence or string-slice, which is read-only
  • Removal of trigraphs
  • Allow typename in a template template parameter
  • New rules for auto deduction from braced-init-list
  • std::uncaught_exceptions, as a replacement of std::uncaught_exception
  • Nested namespace definition
  • Attributes for namespaces and enumerators
  • UTF-8 character literals
  • Constant evaluation for all non-type template arguments
  • Folding expressions
  • New insertion functions for std::map and std::unordered_map
  • Uniform container access
  • Definition of "contiguous iterators"
  • Removal of some deprecated types and functions like std::auto_ptr, std::random_shuffle or old function adaptors
  • A file system library based on boost::filesystem
  • Parallel versions of STL algorithms
  • Additional mathematical special functions
  • Most of Library Fundamentals TS I (e.g. std::optional, std::any)
  • std::variant, a type-safe union container
  • A compile-time static if with the form if constexpr(expression)
  • Decomposition declarations, allowing auto [a, b] = getTwoReturnValues();
  • Initializers in if and switch statements
  • Guaranteed copy elision by compilers in some cases
  • Some extensions on aligned memory allocation
  • Template deduction of constructors, allowing pair(5.0, false) instead of pair<double,bool>(5.0, false)
  • Inline variables, which allows the definition of variables in header files
  • Next standard

  • C++20
  • References

    C++17 Wikipedia