Instagram
youtube
Facebook
Twitter

Standards

Standards:

In the context of programming languages, standards refer to the formal specifications and guidelines that define the rules, syntax, semantics, and behaviour of the language. These standards ensure that code written in a particular language will be portable and will behave consistently across different implementations and platforms.

For C++, there are several major standards that have been released over the years:

  • C++98(ISO/IEC 14882:1998): C++98, also known as C++03 (after the minor correction), was the first standardised interpretation of C++. It introduced many fundamental features of the language, including classes, templates, and exception handling. Still, it had some limitations and lacked certain modern features.
  • C++11(ISO/IEC 14882:2011): C++11, officially known as C++11 ISO/IEC 14882:2011, was a major update to the C++ language. It introduced several significant features, including lambda expressions, smart pointers, move semantics, and range-based loops. C++11 made the language more expressive, safer, and efficient.
  • C++14(ISO/IEC 14882:2014): C++14 was the next minor update to the C++ language, building upon C++11. It provided further enhancements and improvements, including generalised lambda captures, binary literals, and more flexible ‘constexpr’ expressions.
  • C++17(ISO/IEC 14882:2017): C++17 was the next major update to the C++ language. It introduced significant features such as structured bindings, ‘if’ statements with initializers, and various standard library improvements. C++ 17 aims to further improve code readability and simplify common programming tasks.
  • C++20(ISO/IEC 14882:2020): C++20 is the latest major update to the C++ language at the time of my knowledge cutoff in September 2021. It brings many new features and improvements, including concepts, ranges, coroutines, modules, and more powerful lambdas. C++20 aims to make the language more powerful and expressive while also improving performance.

C++ standards are defined by the International Organisation for Standardisation (ISO) in collaboration with the International Electrotechnical Commission (IEC). The standards are periodically updated to incorporate new features and address issues and limitations found in previous versions.

As a C++ programmer, it’s essential to be familiar with the features and improvements introduced in different C++ standards, as it allows you to take advantage of modern language capabilities and write more efficient and maintainable code.

Always ensure that you’re using a compiler that supports the C++ standard you intend to use to take advantage of the latest language features and improvements.