[diff.cpp03.library]

# Annex C (informative) Compatibility [[diff]](./#diff)

## C.6 C++ and ISO C++ 2003 [[diff.cpp03]](diff.cpp03#library)

### C.6.7 [[library]](library "16 Library introduction"): library introduction [diff.cpp03.library]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L2411)

**Affected:** [[library]](library "16 Library introduction") â [[exec]](exec "33 Execution control library")  

**Change:** New reserved identifiers[.](#1.sentence-2)

  


**Rationale:** Required by new features[.](#1.sentence-3)

  


**Effect on original feature:** Valid C++ 2003 code that uses any identifiers added to the C++ standard
library by later revisions of C++ may fail to compile or produce different
results in this revision of C++[.](#1.sentence-4)

A comprehensive list of identifiers used
by the C++ standard library can be found in the Index of Library Names in this
document[.](#1.sentence-5)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L2424)

**Affected subclause:** [[headers]](headers)  


**Change:** New headers[.](#2.sentence-1)

  


**Rationale:** New functionality[.](#2.sentence-2)

  


**Effect on original feature:** The following C++ headers are new:[<array>](array.syn#header:%3carray%3e "23.3.2 Header <array> synopsis [array.syn]"),[<atomic>](atomics.syn#header:%3catomic%3e "32.5.2 Header <atomic> synopsis [atomics.syn]"),[<chrono>](time.syn#header:%3cchrono%3e "30.2 Header <chrono> synopsis [time.syn]"),[<condition_variable>](condition.variable.syn#header:%3ccondition_variable%3e "32.7.2 Header <condition_­variable> synopsis [condition.variable.syn]"),[<forward_list>](forward.list.syn#header:%3cforward_list%3e "23.3.6 Header <forward_­list> synopsis [forward.list.syn]"),[<future>](future.syn#header:%3cfuture%3e "32.10.2 Header <future> synopsis [future.syn]"),<initializer_list> ([[initializer.list.syn]](initializer.list.syn "17.11.2 Header <initializer_­list> synopsis")),[<mutex>](mutex.syn#header:%3cmutex%3e "32.6.2 Header <mutex> synopsis [mutex.syn]"),[<random>](rand.synopsis#header:%3crandom%3e "29.5.2 Header <random> synopsis [rand.synopsis]"),[<ratio>](ratio.syn#header:%3cratio%3e "21.5.2 Header <ratio> synopsis [ratio.syn]"),[<regex>](re.syn#header:%3cregex%3e "28.6.3 Header <regex> synopsis [re.syn]"),[<scoped_allocator>](allocator.adaptor.syn#header:%3cscoped_allocator%3e "20.6.1 Header <scoped_­allocator> synopsis [allocator.adaptor.syn]"),[<system_error>](system.error.syn#header:%3csystem_error%3e "19.5.2 Header <system_­error> synopsis [system.error.syn]"),[<thread>](thread.syn#header:%3cthread%3e "32.4.2 Header <thread> synopsis [thread.syn]"),[<tuple>](tuple.syn#header:%3ctuple%3e "22.4.2 Header <tuple> synopsis [tuple.syn]"),<typeindex> ([[type.index.synopsis]](type.index.synopsis "17.7.6 Header <typeindex> synopsis")),[<type_traits>](meta.type.synop#header:%3ctype_traits%3e "21.3.3 Header <type_­traits> synopsis [meta.type.synop]"),[<unordered_map>](unord.map.syn#header:%3cunordered_map%3e "23.5.2 Header <unordered_­map> synopsis [unord.map.syn]"),
and[<unordered_set>](unord.set.syn#header:%3cunordered_set%3e "23.5.5 Header <unordered_­set> synopsis [unord.set.syn]")[.](#2.sentence-3)

In addition the following C compatibility headers are new:[<cfenv>](cfenv.syn#header:%3ccfenv%3e "29.3.1 Header <cfenv> synopsis [cfenv.syn]"),[<cinttypes>](cinttypes.syn#header:%3ccinttypes%3e "31.13.2 Header <cinttypes> synopsis [cinttypes.syn]"),[<cstdint>](cstdint.syn#header:%3ccstdint%3e "17.4.1 Header <cstdint> synopsis [cstdint.syn]"),
and[<cuchar>](cuchar.syn#header:%3ccuchar%3e "28.7.4 Header <cuchar> synopsis [cuchar.syn]")[.](#2.sentence-4)

Valid C++ 2003 code that #includes headers with these names may be
invalid in this revision of C++[.](#2.sentence-5)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L2460)

**Affected subclause:** [[swappable.requirements]](swappable.requirements)  


**Change:** Function swap moved to a different header[.](#3.sentence-1)

  


**Rationale:** Remove dependency on [<algorithm>](algorithm.syn#header:%3calgorithm%3e "26.4 Header <algorithm> synopsis [algorithm.syn]") for swap[.](#3.sentence-2)

  


**Effect on original feature:** Valid C++ 2003 code that has been compiled expecting swap to be in[<algorithm>](algorithm.syn#header:%3calgorithm%3e "26.4 Header <algorithm> synopsis [algorithm.syn]") may have to instead include [<utility>](utility.syn#header:%3cutility%3e "22.2.1 Header <utility> synopsis [utility.syn]")[.](#3.sentence-3)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L2469)

**Affected subclause:** [[namespace.posix]](namespace.posix)  


**Change:** New reserved namespace[.](#4.sentence-1)

  


**Rationale:** New functionality[.](#4.sentence-2)

  


**Effect on original feature:** The global namespace posix is now reserved for standardization[.](#4.sentence-3)

Valid
C++ 2003 code that uses a top-level namespace posix may be invalid in
this revision of C++[.](#4.sentence-4)

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L2479)

**Affected subclause:** [[macro.names]](macro.names)  


**Change:** Additional restrictions on macro names[.](#5.sentence-1)

  


**Rationale:** Avoid hard to diagnose or non-portable constructs[.](#5.sentence-2)

  


**Effect on original feature:** Names of attribute identifiers may not be used as macro names[.](#5.sentence-3)

Valid C++ 2003
code that defines override, final, ornoreturn as macros is invalid in this
revision of C++[.](#5.sentence-4)
