Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Take you through the modern C-plus and see the common features of C-11


Jun 01, 2021 Article blog


Table of contents


C++11 been a long time coming out, and there's been a lot of good summary articles on the Internet about the new features of C++11 so this article is about taking you through some of the new features of C++11

C++ a language that has a large user base and is also used in multiple areas. From the emergence of C++98 to the official finalization of C++11 has gone through more than a decade of accumulation.

It's the second major version of C++11 (the first one is C?98, the latter is C?17, and C?14 is a small improvement on C?11),and is the most important update from C++ C++98 It introduces a number of changes, standardizes established practices, and improves the abstractions available to C++ programmers.

As an important complement and optimization of C++11 C++20 brings the language to the door of modernization, and the expanded features of all these new standards breathe new life into C++ language. C++14/17

 Take you through the modern C-plus and see the common features of C-111

C++11 an extension and fix to the current C++11 C++ and it not only includes new skills in the core language, but also extends the standard library (STL) of C++ incorporating most of C++ Technical Report 1 (TR1) libraries (except for special functions of mathematics).

Key new features of C?11:

 Take you through the modern C-plus and see the common features of C-112

Core language features

  • auto and decltype
  • A function that is preset and discarded
  • final with override
  • Trailing return type
  • The right value reference
  • Move constructor and move assignment operator
  • There is scope enumeration
  • constexpr with literal type
  • The list is initialized
  • The constructor of delegate and inheritance
  • The brace or equal sign initializer
  • nullptr
  • long long
  • char16_t and char32_t
  • Type alias
  • Variable parameter template
  • Promoted (extraordinary) consortium
  • Promoted POD (normal type and standard layout type)
  • The literal amount of the Unicode string
  • The user defines the literal amount
  • attribute
  • Lambda expression
  • The noexcept descriptor is associated with the noexcept operator
  • alignof and alignas
  • Multithreaded memory model
  • Thread local storage
  • GC interface
  • Range for (based on Boost library)
  • static_assert (based on Boost library)

Library features

header file

lt; t ypeindex& lt; t ype_traits& lt; c hrono& lt; i nitializer_list& lt; t uple& lt; s coped_allocator& lt; c stdint& lt; c inttypes& lt; s ystem_error& lt; c uchar& lt; a rray& lt; f orward_list& lt; u nordered_set& lt; u nordered_map& lt; r andom& lt; r atio& lt; c fenv& lt; r egex& lt; a tomic& lt; t hread& lt; m utex& lt; f uture& lt; condition_variable&

Library features

  • Atomic operations library
  • emplace() is used with other right-value references throughout all parts of the existing standard library
  • std::unique_ptr
  • std::move_iterator
  • std::initializer_list
  • Stateful and scoped allocators
  • std::forward_list
  • Chrono library
  • The ratio library
  • The new algorithm
  • Unicode conversion platform
  • thread library
  • std::exception_ptr
  • std:::error_code and std:::error_condition
  • Iterator improvements:
  • std::begin
  • std::end
  • std::next
  • std::prev
  • Unicode conversion function