cpp03

CPP03 - C++ 03

Return to C++: CPP Standards, C++98, C++03, C++11, C++14, C++17, C++20 and C++23, CPP History

C++03, officially known as ISO/IEC 14882:2003, was a minor update to the original C++98 standard. It did not introduce new language features but focused on fixing issues and clarifying ambiguities found in C++98. The summary below is provided in MediaWiki format, reflecting the nature and scope of the changes made in C++03.

Introduction

C++03 was primarily aimed at correcting defects and ambiguities in C++98, ensuring greater consistency and portability of C++ code across different platforms and compilers.

Core Language Fixes

C++03 made several minor adjustments to the core language to address issues identified in C++98, enhancing the clarity and robustness of the language specification.

Standard Library Fixes

The standard library received numerous fixes and clarifications, improving the reliability and performance of standard library components.

Export Template

Although the export keyword for templates was introduced in C++98, C++03 did not remove it despite its lack of support by most compilers. It was later deprecated and removed in C++11.

Value Initialization

C++03 introduced value initialization to address issues with initializing objects of built-in type, providing a more consistent initialization mechanism across different types.

`std::auto_ptr` Clarifications

The behavior and usage of `std::auto_ptr` were clarified, although `std::auto_ptr` was eventually deprecated in C++11 and removed in favor of smart pointers like `std::unique_ptr`.

Library Extensions

While C++03 did not add new library components, it made important fixes that improved the usability and consistency of the existing standard library.

Memory Model

C++03 did not introduce a formal memory model but laid the groundwork for the development of a memory model introduced in C++11 to support multithreading and concurrency.

Compiler Compatibility

C++03 aimed at improving compatibility among different compilers, ensuring that C++ code would be more consistently handled across various platforms.

Clarification on Undefined Behavior

The standard made efforts to better define and clarify scenarios that would lead to undefined behavior, enhancing the predictability of C++ programs.

Exception Specifications

C++03 continued to support exception specifications from C++98, but their usage was discouraged due to the complexities and limitations they introduced, leading to their eventual deprecation in C++11.

`mutable` Keyword Clarifications

Clarifications regarding the `mutable` keyword were provided, particularly concerning its use with const member functions.

Use of `typename`

C++03 clarified the use of the `typename` keyword outside of template code, making templates easier to write and understand.

ADL (Argument-Dependent Lookup) Fixes

C++03 addressed issues with argument-dependent lookup (ADL), refining the rules to ensure more intuitive and predictable behavior.

Two-phase Name Lookup

Clarifications on the two-phase name lookup for templates were made, aiming at resolving ambiguities and inconsistencies in template instantiation.

Deprecation Notices

C++03 introduced deprecation notices for certain features that were considered outdated or superseded by better alternatives, setting the stage for their removal in future standards.

Trigraphs

C++03 continued to support trigraphs, a feature inherited from C for representing certain characters, although their use was discouraged.

Copy Initialization

The standard clarified rules around copy initialization, particularly regarding the use of explicit constructors and conversion operators.

For Loop Scope

C++03 clarified the scope of variables declared in a for loop, ensuring consistent behavior across different compilers.

Conclusion

C++03 was a necessary step in the evolution of the C++ language, addressing immediate needs for clarification and correction following C++98. It set the stage for more significant revisions introduced in C++11, which brought about substantial changes to the language and its capabilities.

For detailed information on C++03 and its specifications, the official ISO C++ website (s://isocpp.org/(https://isocpp.org/)) serves as a primary resource. Unfortunately, a direct GitHub repository link specifically for C++03 documentation cannot be provided here, but interested readers can find further resources and discussions on C++ standards development through the ISO C++ website and associated forums.

This summary highlights the nature of C++03 as an incremental update focused on refinement and clarification, demonstrating the ongoing commitment to maintaining and improving the quality and consistency of the C++ language standard.

C++: C++ Fundamentals, C++ Inventor - C++ Language Designer: Bjarne Stroustrup in 1985; C++ Keywords, C++ Built-In Data Types, C++ Data Structures (CPP Containers) - C++ Algorithms, C++ Syntax, C++ OOP - C++ Design Patterns, Clean C++ - C++ Style Guide, C++ Best Practices ( C++ Core Guidelines (CG)) - C++ BDD, C++ Standards ( C++ 23, C++ 20, C++ 17, C++ 14, C++ 11, C++ 03, C++ 98), Bjarne Stroustrup's C++ Glossary, CppReference.com, CPlusPlus.com, ISOcpp.org, C++ Compilers (Compiler Explorer, MinGW), C++ IDEs, C++ Development Tools, C++ Linter, C++ Debugging, C++ Modules ( C++20), C++ Packages, C++ Package Manager ( Conan - the C/C++ Package Manager), C++ Standard Library, C++ Libraries, C++ Frameworks, C++ DevOps - C++ SRE, C++ CI/CD ( C++ Build Pipeline), C++ Data Science - C++ DataOps, C++ Machine Learning, C++ Deep Learning, Functional C++, C++ Concurrency, C++ History, C++ Topics, C++ Bibliography, Manning C++ Series, C++ Courses, CppCon, C++ Research, C++ GitHub, Written in C++, C++ Popularity, C++ Awesome , C++ Versions. (navbar_cplusplus – see also navbar_cpp_containers, navbar_cppcon, navbar_cpp_core_guidelines, navbar_cpp23, navbar_cpp20, navbar_cpp17, navbar_cpp14, navbar_cpp11)


© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


cpp03.txt · Last modified: 2024/04/28 03:12 (external edit)