xref: /llvm-project/libcxx/docs/DesignDocs/ExtendedCXX03Support.rst (revision 59716479fc2f78ccabb2fc47b23cdc636d4ce122)
1=======================
2Extended C++03 Support
3=======================
4
5.. contents::
6   :local:
7
8Overview
9========
10
11libc++ is an implementation of the C++ standard library targeting C++11 or later.
12
13In C++03, the library implements the C++11 standard using C++11 language extensions provided
14by Clang.
15
16This document tracks the C++11 extensions libc++ requires, the C++11 extensions it provides,
17and how to write minimal C++11 inside libc++.
18
19Required C++11 Compiler Extensions
20==================================
21
22Clang provides a large subset of C++11 in C++03 as an extension. The features
23libc++ expects Clang  to provide are:
24
25* Variadic templates.
26* RValue references and perfect forwarding.
27* Alias templates
28* defaulted and deleted Functions.
29* reference qualified Functions
30* ``auto``
31
32There are also features that Clang *does not* provide as an extension in C++03
33mode. These include:
34
35* ``constexpr`` and ``noexcept``
36*  Trailing return types.
37* ``>>`` without a space.
38
39
40Provided C++11 Library Extensions
41=================================
42
43.. warning::
44  The C++11 extensions libc++ provides in C++03 are currently undergoing change. Existing extensions
45  may be removed in the future. New users are strongly discouraged depending on these extension
46  in new code.
47
48  This section will be updated once the libc++ developer community has further discussed the
49  future of C++03 with libc++.
50