
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Different C++ Versions
C++ is a general-purpose, object-oriented programming language, which was developed by Bjarne Stroustrup at Bell Labs in the 1980s. It's an extension of the C language as it includes C features with additional object-oriented concepts like classes, inheritance, polymorphism, encapsulation, and abstraction.
Before, it was known as "C with Classes" around 1979, but later renamed as C++ in 1983.
These versions of the C++ language are compilers, which are implemented with the following rules made by the ISO C++ community, the community that looks over the development of the language.
Here is the following list of C++ versions.
- C++98 (ISO/IEC 14882:1998) - first edition.
- C++03 (ISO/IEC 14882:2003) - second edition.
- C++11 (ISO/IEC 14882:2011) - third edition.
- C++14 (ISO/IEC 14882:2014) - fourth edition.
- C++17 (ISO/IEC 14882:2017) - fifth edition.
- C++20 (ISO/IEC 14882:2020) - sixth edition.
- C++23 (ISO/IEC 14882:2023) - seventh edition.
- C++26 (Upcoming) - eighth edition.
All of these versions have a lot of differences, mainly additions to the standard library and expansion of APIs. These standards also have differences in APIs because of the removal of old features. Here we will look at all versions of C++ in detail.
C++98 (ISO/IEC 14882:1998)
This was the first official standard of the C++ language introduced in 1998, therefore known as C++98; before this, there was no fixed set of rules for it.
C++98 brought formal structure, which mainly includes;
- Templates
- Standard Template Library (STL) (like vectors, lists, and maps etc.)
- Namespaces
- Exceptions for error handling
- Bool type
C++03 (ISO/IEC 14882:2003)
The C++03, released in 2003 which was just a minor revision of C++98 that fixes bugs and inconsistencies. It was not a big update, just like a cleanup of C++98; mainly, we can say a technical correction.
C++11 (ISO/IEC 14882:2011)
C++11, which was released in 2011 also nicknamed C++0x(because it was expected to be released around the 200x decade, but took a longer time than planned). But it was truly a game changer; it brought major updates with many new features, which improved overall C++ programming, making it more powerful.
Its main key features are;
- auto keyword
- nullptr
- Lambda Functions
- Smart Pointers
- Range-based for loop
- unordered_map
- Enum Class
- Multithreading
- Uniform Initialization
C++14 (ISO/IEC 14882:2014)
C++14 was released in December 2014; it is mainly considered a minor update, but it brought more elegance and efficiency to C++11. It brought improvements in syntax, performance, and template programming.
Extra key features being added to C++14 are;
- Generic Lambdas
- auto Return Type Deduction for Functions
- decltype(auto)
- make_unique
- Binary Literals
- Digit Separators ('), this is for better readability
- Template Improvements
C++17 (ISO/IEC 14882:2017)
After a large update in C++11 and a little polish in C++14, the next plan was to add more missing features, expand the standard Library, improve compile-time programming, and template usability.
So to bring further improvements, C++17 launches improvements in languages like;
- structured Bindings
- Fold Expressions
- Template argument deduction for classes
- Inline variables
- nested namespaces
Improvements in the library are;
- std::optional
- std::any
- std::string_view
- std::invoke
As well as to maintain performance and simplicity, they removed auto_ptr, random_shuffle, register keyword, and Old exception specs (throw()).
C++20 (ISO/IEC 14882:2020)
This is the sixth edition of the C++ standard and has had a significant role in modern C++ evolution. This version of C++ is considered to be the biggest update after C++11, as it introduces various powerful features and concepts like Coroutines, Ranges, Modules, and consteval that support modern designs and functionality.
Additional language features like;
- Defining constraints for template parameters.
- Introduces ranges to work with sequences like vectors, maps, etc.
- Coroutines, writing asynchronous code like await/async.
- consteval and constinit
- three-way comparison operator <=> or spaceship operator.
Additional Libraries are;
- std::ranges
- std::format
- std::span
- std::bit_cast
Overall, it improved the readability and template programming and introduced async and reactive programming, which make it a modern language.
C++23 (ISO/IEC 14882:2023)
This version was released in December 2023, It's again an evolution of C++20, where it worked on polishing and enhancing the existing features of C++20.
The main key features of improved existing features are;
- std::print / std::println
- deducing this (Explicit this parameter)
- static operator() for lambdas
- Multidimensional subscript operator (operator[])
- Unicode support improvements, etc.
This makes it more convenient and better for error handling.
C++26 (Upcoming)
This version is expected to be released around 2026, that is, every 3 years after the previous standard. It's under development by the ISO C++ committee and is working on bringing various features and changes, like;
- Pattern matching
- Executor-based concurrency
- Better support for SIMD / vectorization
- Cleaner syntax for coroutines
- More powerful metaprogramming
- Improved Modules, and many more.
In short, making C++ more efficient for high-performance applications.
Further, if you want to read more about the specifications of these versions in detail, you can visit the ISO website: https://isocpp.org/. All the specification drafts are available for free download on the website. You can also comment on the current draft under development on their GitHub repository: https://github.com/cplusplus/draft