This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

99
cppdraft/depr/atomics.md Normal file
View File

@@ -0,0 +1,99 @@
[depr.atomics]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.23 Deprecated atomic operations [depr.atomics]
### [D.23.1](#general) General [[depr.atomics.general]](depr.atomics.general)
[1](#general-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L912)
The header [<atomic>](atomics.syn#header:%3catomic%3e "32.5.2Header <atomic> synopsis[atomics.syn]") has the following additions[.](#general-1.sentence-1)
namespace std {template<class T>void atomic_init(volatile atomic<T>*, typename atomic<T>::value_type) noexcept; template<class T>void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept; template<class T>constexpr T kill_dependency(T y) noexcept; // freestandinginline constexpr memory_order memory_order_consume = memory_order::consume; // freestanding#define ATOMIC_VAR_INIT(value) *see below*}
### [D.23.2](#volatile) Volatile access [[depr.atomics.volatile]](depr.atomics.volatile)
[1](#volatile-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L930)
If an atomic ([[atomics.types.generic]](atomics.types.generic "32.5.8Class template atomic")) specialization has one of the following overloads,
then that overload participates in overload resolution
even if atomic<T>::is_always_lock_free is false:void store(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
T operator=(T desired) volatile noexcept;
T load(memory_order order = memory_order::seq_cst) const volatile noexcept;operator T() const volatile noexcept;
T exchange(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;bool compare_exchange_weak(T& expected, T desired,
memory_order success, memory_order failure) volatile noexcept;bool compare_exchange_strong(T& expected, T desired,
memory_order success, memory_order failure) volatile noexcept;bool compare_exchange_weak(T& expected, T desired,
memory_order order = memory_order::seq_cst) volatile noexcept;bool compare_exchange_strong(T& expected, T desired,
memory_order order = memory_order::seq_cst) volatile noexcept;
T fetch_*key*(T operand, memory_order order = memory_order::seq_cst) volatile noexcept;
T operator *op*=(T operand) volatile noexcept;
T* fetch_*key*(ptrdiff_t operand, memory_order order = memory_order::seq_cst) volatile noexcept;
### [D.23.3](#nonmembers) Non-member functions [[depr.atomics.nonmembers]](depr.atomics.nonmembers)
[🔗](#lib:atomic_init)
`template<class T>
void atomic_init(volatile atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
template<class T>
void atomic_init(atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
`
[1](#nonmembers-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L964)
*Effects*: Equivalent to: atomic_store_explicit(object, desired, memory_order::relaxed);
### [D.23.4](#types.operations) Operations on atomic types [[depr.atomics.types.operations]](depr.atomics.types.operations)
[🔗](#lib:ATOMIC_VAR_INIT_)
`#define ATOMIC_VAR_INIT(value) see below
`
[1](#types.operations-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L977)
The macro expands to a token sequence suitable for constant initialization of
an atomic variable with static storage duration of a type that
is initialization-compatible with value[.](#types.operations-1.sentence-1)
[*Note [1](#types.operations-note-1)*:
This operation possibly needs to initialize locks[.](#types.operations-1.sentence-2)
— *end note*]
Concurrent access to the variable being initialized,
even via an atomic operation,
constitutes a data race[.](#types.operations-1.sentence-3)
[*Example [1](#types.operations-example-1)*: atomic<int> v = ATOMIC_VAR_INIT(5); — *end example*]
### [D.23.5](#order) memory_order::consume [[depr.atomics.order]](depr.atomics.order)
[1](#order-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L998)
The memory_order enumeration contains an additional enumerator:consume = 1
The memory_order::consume enumerator is allowed wherevermemory_order::acquire is allowed, and it has the same meaning[.](#order-1.sentence-2)
[🔗](#order-itemdecl:1)
`template<class T> constexpr T kill_dependency(T y) noexcept;
`
[2](#order-2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L1011)
*Returns*: y[.](#order-2.sentence-1)

View File

@@ -0,0 +1,15 @@
[depr.atomics.general]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.23 Deprecated atomic operations [[depr.atomics]](depr.atomics#general)
### D.23.1 General [depr.atomics.general]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L912)
The header [<atomic>](atomics.syn#header:%3catomic%3e "32.5.2Header <atomic> synopsis[atomics.syn]") has the following additions[.](#1.sentence-1)
namespace std {template<class T>void atomic_init(volatile atomic<T>*, typename atomic<T>::value_type) noexcept; template<class T>void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept; template<class T>constexpr T kill_dependency(T y) noexcept; // freestandinginline constexpr memory_order memory_order_consume = memory_order::consume; // freestanding#define ATOMIC_VAR_INIT(value) *see below*}

View File

@@ -0,0 +1,21 @@
[depr.atomics.nonmembers]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.23 Deprecated atomic operations [[depr.atomics]](depr.atomics#nonmembers)
### D.23.3 Non-member functions [depr.atomics.nonmembers]
[🔗](#lib:atomic_init)
`template<class T>
void atomic_init(volatile atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
template<class T>
void atomic_init(atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L964)
*Effects*: Equivalent to: atomic_store_explicit(object, desired, memory_order::relaxed);

View File

@@ -0,0 +1,26 @@
[depr.atomics.order]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.23 Deprecated atomic operations [[depr.atomics]](depr.atomics#order)
### D.23.5 memory_order::consume [depr.atomics.order]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L998)
The memory_order enumeration contains an additional enumerator:consume = 1
The memory_order::consume enumerator is allowed wherevermemory_order::acquire is allowed, and it has the same meaning[.](#1.sentence-2)
[🔗](#itemdecl:1)
`template<class T> constexpr T kill_dependency(T y) noexcept;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L1011)
*Returns*: y[.](#2.sentence-1)

View File

@@ -0,0 +1,32 @@
[depr.atomics.types.operations]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.23 Deprecated atomic operations [[depr.atomics]](depr.atomics#types.operations)
### D.23.4 Operations on atomic types [depr.atomics.types.operations]
[🔗](#lib:ATOMIC_VAR_INIT)
`#define ATOMIC_VAR_INIT(value) see below
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L977)
The macro expands to a token sequence suitable for constant initialization of
an atomic variable with static storage duration of a type that
is initialization-compatible with value[.](#1.sentence-1)
[*Note [1](#note-1)*:
This operation possibly needs to initialize locks[.](#1.sentence-2)
— *end note*]
Concurrent access to the variable being initialized,
even via an atomic operation,
constitutes a data race[.](#1.sentence-3)
[*Example [1](#example-1)*: atomic<int> v = ATOMIC_VAR_INIT(5); — *end example*]

View File

@@ -0,0 +1,25 @@
[depr.atomics.volatile]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.23 Deprecated atomic operations [[depr.atomics]](depr.atomics#volatile)
### D.23.2 Volatile access [depr.atomics.volatile]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L930)
If an atomic ([[atomics.types.generic]](atomics.types.generic "32.5.8Class template atomic")) specialization has one of the following overloads,
then that overload participates in overload resolution
even if atomic<T>::is_always_lock_free is false:void store(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
T operator=(T desired) volatile noexcept;
T load(memory_order order = memory_order::seq_cst) const volatile noexcept;operator T() const volatile noexcept;
T exchange(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;bool compare_exchange_weak(T& expected, T desired,
memory_order success, memory_order failure) volatile noexcept;bool compare_exchange_strong(T& expected, T desired,
memory_order success, memory_order failure) volatile noexcept;bool compare_exchange_weak(T& expected, T desired,
memory_order order = memory_order::seq_cst) volatile noexcept;bool compare_exchange_strong(T& expected, T desired,
memory_order order = memory_order::seq_cst) volatile noexcept;
T fetch_*key*(T operand, memory_order order = memory_order::seq_cst) volatile noexcept;
T operator *op*=(T operand) volatile noexcept;
T* fetch_*key*(ptrdiff_t operand, memory_order order = memory_order::seq_cst) volatile noexcept;

34
cppdraft/depr/c/macros.md Normal file
View File

@@ -0,0 +1,34 @@
[depr.c.macros]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.11 Deprecated C macros [depr.c.macros]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L222)
The header [<cfloat>](cfloat.syn#header:%3ccfloat%3e "17.3.7Header <cfloat> synopsis[cfloat.syn]") has the following macros:#define FLT_HAS_SUBNORM *see below*#define DBL_HAS_SUBNORM *see below*#define LDBL_HAS_SUBNORM *see below*#define DECIMAL_DIG *see below*
The header defines these macros the same as
the C standard library header [<float.h>](support.c.headers.general#header:%3cfloat.h%3e "17.15.1General[support.c.headers.general]")[.](#1.sentence-2)
See also: ISO/IEC 9899:2024, 5.2.4.2.2, 7.33.5
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L235)
In addition to being available via inclusion of the [<cfloat>](cfloat.syn#header:%3ccfloat%3e "17.3.7Header <cfloat> synopsis[cfloat.syn]") header,
the macros INFINITY and NAN are
available when [<cmath>](cmath.syn#header:%3ccmath%3e "29.7.1Header <cmath> synopsis[cmath.syn]") is included[.](#2.sentence-1)
See also: ISO/IEC 9899:2024, 7.12
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L242)
The header [<stdbool.h>](stdbool.h.syn#header:%3cstdbool.h%3e "17.15.5Header <stdbool.h> synopsis[stdbool.h.syn]") has the following macro:#define __bool_true_false_are_defined 1
See also: ISO/IEC 9899:2024, 7.19

View File

@@ -0,0 +1,14 @@
[depr.capture.this]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.3 Implicit capture of *this by reference [depr.capture.this]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L41)
For compatibility with prior revisions of C++,
a [*lambda-expression*](expr.prim.lambda.general#nt:lambda-expression "7.5.6.1General[expr.prim.lambda.general]") with [*capture-default*](expr.prim.lambda.capture#nt:capture-default "7.5.6.3Captures[expr.prim.lambda.capture]")= ([[expr.prim.lambda.capture]](expr.prim.lambda.capture "7.5.6.3Captures")) may implicitly capture*this by reference[.](#1.sentence-1)
[*Example [1](#example-1)*: struct X {int x; void foo(int n) {auto f = [=]() { x = n; }; // deprecated: x means this->x, not a copy thereofauto g = [=, this]() { x = n; }; // recommended replacement}}; — *end example*]

36
cppdraft/depr/cerrno.md Normal file
View File

@@ -0,0 +1,36 @@
[depr.cerrno]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.12 Deprecated error numbers [depr.cerrno]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L252)
The header [<cerrno>](errno.general#header:%3ccerrno%3e "19.4.1General[errno.general]") has the following additional macros:
#define ENODATA *see below*#define ENOSR *see below*#define ENOSTR *see below*#define ETIME *see below*
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L262)
The meaning of these macros is defined by the POSIX standard[.](#2.sentence-1)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L265)
The following enum errc enumerators are defined
in addition to those specified in [[system.error.syn]](system.error.syn "19.5.2Header <system_­error> synopsis"):
[no_message_available](#lib:errc,no_message_available "D.12Deprecated error numbers[depr.cerrno]"), // ENODATA[no_stream_resources](#lib:errc,no_stream_resources "D.12Deprecated error numbers[depr.cerrno]"), // ENOSR[not_a_stream](#lib:errc,not_a_stream "D.12Deprecated error numbers[depr.cerrno]"), // ENOSTR[stream_timeout](#lib:errc,stream_timeout "D.12Deprecated error numbers[depr.cerrno]"), // ETIME
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L276)
The value of each enum errc enumerator above
is the same as the value of the [<cerrno>](errno.general#header:%3ccerrno%3e "19.4.1General[errno.general]") macro
shown in the above synopsis[.](#4.sentence-1)

19
cppdraft/depr/ctime.md Normal file
View File

@@ -0,0 +1,19 @@
[depr.ctime]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.21 Deprecated time formatting [depr.ctime]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L776)
The header [<ctime>](ctime.syn#header:%3cctime%3e "30.15Header <ctime> synopsis[ctime.syn]") has the following additions:char* asctime(const tm* timeptr);char* ctime(const time_t* timer);
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L783)
The functions asctime and ctime are not required to avoid data races ([[res.on.data.races]](res.on.data.races "16.4.6.10Data race avoidance"))[.](#2.sentence-1)
See also: ISO/IEC 9899:2024, 7.29

View File

@@ -0,0 +1,9 @@
[depr.ellipsis.comma]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.5 Non-comma-separated ellipsis parameters [depr.ellipsis.comma]
A [*parameter-declaration-clause*](dcl.fct#nt:parameter-declaration-clause "9.3.4.6Functions[dcl.fct]") of the form[*parameter-declaration-list*](dcl.fct#nt:parameter-declaration-list "9.3.4.6Functions[dcl.fct]") ... is deprecated ([[dcl.fct]](dcl.fct "9.3.4.6Functions"))[.](#sentence-1)
[*Example [1](#example-1)*: void f(int...); // deprecatedvoid g(auto...); // OK, declares a function parameter packvoid h(auto......); // deprecated — *end example*]

View File

@@ -0,0 +1,145 @@
[depr.filesystems]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.22 Deprecated file systems [depr.filesystems]
### [D.22.1](#depr.fs.path.factory) Deprecated filesystem path factory functions [[depr.fs.path.factory]](depr.fs.path.factory)
[1](#depr.fs.path.factory-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L793)
The header [<filesystem>](fs.filesystem.syn#header:%3cfilesystem%3e "31.12.4Header <filesystem> synopsis[fs.filesystem.syn]") has the following additions:
[🔗](#lib:u8path)
`template<class Source>
path u8path(const Source& source);
template<class InputIterator>
path u8path(InputIterator first, InputIterator last);
`
[2](#depr.fs.path.factory-2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L804)
*Mandates*: The value type of Source and InputIterator ischar or char8_t[.](#depr.fs.path.factory-2.sentence-1)
[3](#depr.fs.path.factory-3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L809)
*Preconditions*: The source and [first, last) sequences are UTF-8 encoded[.](#depr.fs.path.factory-3.sentence-1)
Source meets the requirements specified in [[fs.path.req]](fs.path.req "31.12.6.4Requirements")[.](#depr.fs.path.factory-3.sentence-2)
[4](#depr.fs.path.factory-4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L814)
*Returns*:
- [(4.1)](#depr.fs.path.factory-4.1)
If path::value_type is char and the current native
narrow encoding ([[fs.path.type.cvt]](fs.path.type.cvt "31.12.6.3.2Type and encoding conversions")) is UTF-8,
return path(source) or path(first, last);
otherwise,
- [(4.2)](#depr.fs.path.factory-4.2)
if path::value_type is wchar_t and the
native wide encoding is UTF-16, or
if path::value_type is char16_t or char32_t,
convert source or [first, last)
to a temporary, tmp, of type path::string_type and
return path(tmp);
otherwise,
- [(4.3)](#depr.fs.path.factory-4.3)
convert source or [first, last)
to a temporary, tmp, of type u32string and
return path(tmp)[.](#depr.fs.path.factory-4.sentence-1)
[5](#depr.fs.path.factory-5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L833)
*Remarks*: Argument format conversion ([[fs.path.fmt.cvt]](fs.path.fmt.cvt "31.12.6.3.1Argument format conversions")) applies to the
arguments for these functions[.](#depr.fs.path.factory-5.sentence-1)
How Unicode encoding conversions are performed is
unspecified[.](#depr.fs.path.factory-5.sentence-2)
[6](#depr.fs.path.factory-6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L839)
[*Example [1](#depr.fs.path.factory-example-1)*:
A string is to be read from a database that is encoded in UTF-8, and used
to create a directory using the native encoding for filenames:namespace fs = std::filesystem;
std::string utf8_string = read_utf8_data();
fs::create_directory(fs::u8path(utf8_string));
For POSIX-based operating systems with the native narrow encoding set
to UTF-8, no encoding or type conversion occurs[.](#depr.fs.path.factory-6.sentence-2)
For POSIX-based operating systems with the native narrow encoding not
set to UTF-8, a conversion to UTF-32 occurs, followed by a conversion to the
current native narrow encoding[.](#depr.fs.path.factory-6.sentence-3)
Some Unicode characters may have no native character
set representation[.](#depr.fs.path.factory-6.sentence-4)
For Windows-based operating systems a conversion from UTF-8 to
UTF-16 occurs[.](#depr.fs.path.factory-6.sentence-5)
— *end example*]
[*Note [1](#depr.fs.path.factory-note-1)*:
The example above is representative of
a historical use of filesystem::u8path[.](#depr.fs.path.factory-6.sentence-6)
To indicate a UTF-8 encoding,
passing a std::u8string to path's constructor is preferred
as it is consistent with path's handling of other encodings[.](#depr.fs.path.factory-6.sentence-7)
— *end note*]
### [D.22.2](#depr.fs.path.obs) Deprecated filesystem path format observers [[depr.fs.path.obs]](depr.fs.path.obs)
[1](#depr.fs.path.obs-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L872)
The following members are declared in addition to those members
specified in [[fs.path.member]](fs.path.member "31.12.6.5Members"):
namespace std::filesystem {class path {public: std::string string() const;
std::string generic_string() const; };}
[🔗](#lib:string,path)
`std::string string() const;
`
[2](#depr.fs.path.obs-2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L892)
*Returns*: system_encoded_string()[.](#depr.fs.path.obs-2.sentence-1)
[🔗](#lib:generic_string,path)
`std::string generic_string() const;
`
[3](#depr.fs.path.obs-3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L903)
*Returns*: generic_system_encoded_string()[.](#depr.fs.path.obs-3.sentence-1)

29
cppdraft/depr/format.md Normal file
View File

@@ -0,0 +1,29 @@
[depr.format]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.20 Deprecated formatting [depr.format]
### [D.20.1](#syn) Header <format> synopsis [[depr.format.syn]](depr.format.syn)
[1](#syn-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L750)
The header [<format>](format.formatter.spec#header:%3cformat%3e "28.5.6.4Formatter specializations[format.formatter.spec]") has the following additions:
namespace std {template<class Visitor, class Context>decltype(auto) visit_format_arg(Visitor&& vis, basic_format_arg<Context> arg);}
### [D.20.2](#arg) Formatting arguments [[depr.format.arg]](depr.format.arg)
[🔗](#lib:visit_format_arg)
`template<class Visitor, class Context>
decltype(auto) visit_format_arg(Visitor&& vis, basic_format_arg<Context> arg);
`
[1](#arg-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L769)
*Effects*: Equivalent to: return visit(std::forward<Visitor>(vis), arg.value);

View File

@@ -0,0 +1,19 @@
[depr.format.arg]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.20 Deprecated formatting [[depr.format]](depr.format#arg)
### D.20.2 Formatting arguments [depr.format.arg]
[🔗](#lib:visit_format_arg)
`template<class Visitor, class Context>
decltype(auto) visit_format_arg(Visitor&& vis, basic_format_arg<Context> arg);
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L769)
*Effects*: Equivalent to: return visit(std::forward<Visitor>(vis), arg.value);

View File

@@ -0,0 +1,15 @@
[depr.format.syn]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.20 Deprecated formatting [[depr.format]](depr.format#syn)
### D.20.1 Header <format> synopsis [depr.format.syn]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L750)
The header [<format>](format.formatter.spec#header:%3cformat%3e "28.5.6.4Formatter specializations[format.formatter.spec]") has the following additions:
namespace std {template<class Visitor, class Context>decltype(auto) visit_format_arg(Visitor&& vis, basic_format_arg<Context> arg);}

View File

@@ -0,0 +1,111 @@
[depr.fs.path.factory]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.22 Deprecated file systems [[depr.filesystems]](depr.filesystems#depr.fs.path.factory)
### D.22.1 Deprecated filesystem path factory functions [depr.fs.path.factory]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L793)
The header [<filesystem>](fs.filesystem.syn#header:%3cfilesystem%3e "31.12.4Header <filesystem> synopsis[fs.filesystem.syn]") has the following additions:
[🔗](#lib:u8path)
`template<class Source>
path u8path(const Source& source);
template<class InputIterator>
path u8path(InputIterator first, InputIterator last);
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L804)
*Mandates*: The value type of Source and InputIterator ischar or char8_t[.](#2.sentence-1)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L809)
*Preconditions*: The source and [first, last) sequences are UTF-8 encoded[.](#3.sentence-1)
Source meets the requirements specified in [[fs.path.req]](fs.path.req "31.12.6.4Requirements")[.](#3.sentence-2)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L814)
*Returns*:
- [(4.1)](#4.1)
If path::value_type is char and the current native
narrow encoding ([[fs.path.type.cvt]](fs.path.type.cvt "31.12.6.3.2Type and encoding conversions")) is UTF-8,
return path(source) or path(first, last);
otherwise,
- [(4.2)](#4.2)
if path::value_type is wchar_t and the
native wide encoding is UTF-16, or
if path::value_type is char16_t or char32_t,
convert source or [first, last)
to a temporary, tmp, of type path::string_type and
return path(tmp);
otherwise,
- [(4.3)](#4.3)
convert source or [first, last)
to a temporary, tmp, of type u32string and
return path(tmp)[.](#4.sentence-1)
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L833)
*Remarks*: Argument format conversion ([[fs.path.fmt.cvt]](fs.path.fmt.cvt "31.12.6.3.1Argument format conversions")) applies to the
arguments for these functions[.](#5.sentence-1)
How Unicode encoding conversions are performed is
unspecified[.](#5.sentence-2)
[6](#6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L839)
[*Example [1](#example-1)*:
A string is to be read from a database that is encoded in UTF-8, and used
to create a directory using the native encoding for filenames:namespace fs = std::filesystem;
std::string utf8_string = read_utf8_data();
fs::create_directory(fs::u8path(utf8_string));
For POSIX-based operating systems with the native narrow encoding set
to UTF-8, no encoding or type conversion occurs[.](#6.sentence-2)
For POSIX-based operating systems with the native narrow encoding not
set to UTF-8, a conversion to UTF-32 occurs, followed by a conversion to the
current native narrow encoding[.](#6.sentence-3)
Some Unicode characters may have no native character
set representation[.](#6.sentence-4)
For Windows-based operating systems a conversion from UTF-8 to
UTF-16 occurs[.](#6.sentence-5)
— *end example*]
[*Note [1](#note-1)*:
The example above is representative of
a historical use of filesystem::u8path[.](#6.sentence-6)
To indicate a UTF-8 encoding,
passing a std::u8string to path's constructor is preferred
as it is consistent with path's handling of other encodings[.](#6.sentence-7)
— *end note*]

View File

@@ -0,0 +1,39 @@
[depr.fs.path.obs]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.22 Deprecated file systems [[depr.filesystems]](depr.filesystems#depr.fs.path.obs)
### D.22.2 Deprecated filesystem path format observers [depr.fs.path.obs]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L872)
The following members are declared in addition to those members
specified in [[fs.path.member]](fs.path.member "31.12.6.5Members"):
namespace std::filesystem {class path {public: std::string string() const;
std::string generic_string() const; };}
[🔗](#lib:string,path)
`std::string string() const;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L892)
*Returns*: system_encoded_string()[.](#2.sentence-1)
[🔗](#lib:generic_string,path)
`std::string generic_string() const;
`
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L903)
*Returns*: generic_system_encoded_string()[.](#3.sentence-1)

22
cppdraft/depr/general.md Normal file
View File

@@ -0,0 +1,22 @@
[depr.general]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.1 General [depr.general]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L6)
This Annex describes features of this document
that are specified for compatibility with existing implementations[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L10)
These are deprecated features, where[*deprecated*](#def:deprecated) is defined as:
Normative for the current revision of C++,
but having been identified as a candidate for removal from future revisions[.](#2.sentence-1)
An implementation may declare library names and entities described in this Clause with the[deprecated attribute](dcl.attr.deprecated "9.13.4Deprecated attribute[dcl.attr.deprecated]")[.](#2.sentence-2)

20
cppdraft/depr/impldec.md Normal file
View File

@@ -0,0 +1,20 @@
[depr.impldec]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.6 Implicit declaration of copy functions [depr.impldec]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L134)
The implicit definition of a [copy constructor](class.copy.ctor "11.4.5.3Copy/move constructors[class.copy.ctor]") as defaulted is deprecated if the class has
a user-declared copy assignment operator or
a user-declared [destructor](class.dtor "11.4.7Destructors[class.dtor]")[.](#1.sentence-1)
The implicit definition of a [copy assignment operator](class.copy.assign "11.4.6Copy/move assignment operator[class.copy.assign]") as defaulted is deprecated if the class has
a user-declared copy constructor or
a user-declared destructor[.](#1.sentence-2)
It is possible that future versions of C++ will specify
that these implicit definitions are deleted ([[dcl.fct.def.delete]](dcl.fct.def.delete "9.6.3Deleted definitions"))[.](#1.sentence-3)

46
cppdraft/depr/iterator.md Normal file
View File

@@ -0,0 +1,46 @@
[depr.iterator]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.17 Deprecated iterator class template [depr.iterator]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L638)
The header [<iterator>](iterator.synopsis#header:%3citerator%3e "24.2Header <iterator>&nbsp;synopsis[iterator.synopsis]") has the following addition:
[🔗](#lib:iterator)
namespace std {template<class Category, class T, class Distance = ptrdiff_t, class Pointer = T*, class Reference = T&>struct iterator {using iterator_category = Category; using value_type = T; using difference_type = Distance; using pointer = Pointer; using reference = Reference; };}
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L655)
Theiterator template may be used as a base class to ease the definition of required types
for new iterators[.](#2.sentence-1)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L661)
[*Note [1](#note-1)*:
If the new iterator type is a class template, then these aliases
will not be visible from within the iterator class's template definition, but
only to callers of that class[.](#3.sentence-1)
— *end note*]
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L668)
[*Example [1](#example-1)*:
If a C++ program wants to define a bidirectional iterator for some data
structure containing double and such that it works on a large memory
model of the implementation, it can do so with:class MyIterator :public iterator<bidirectional_iterator_tag, double, long, T*, T&> {// code implementing ++, etc.};
— *end example*]

11
cppdraft/depr/lit.md Normal file
View File

@@ -0,0 +1,11 @@
[depr.lit]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.8 Literal operator function declarations using an identifier [depr.lit]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L165)
A [*literal-operator-id*](over.literal#nt:literal-operator-id "12.6User-defined literals[over.literal]") ([[over.literal]](over.literal "12.6User-defined literals")) of the formoperator [*unevaluated-string*](lex.string.uneval#nt:unevaluated-string "5.13.6Unevaluated strings[lex.string.uneval]") [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") is deprecated[.](#1.sentence-1)

20
cppdraft/depr/local.md Normal file
View File

@@ -0,0 +1,20 @@
[depr.local]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.2 Non-local use of TU-local entities [depr.local]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L21)
A declaration of a non-TU-local entity that is an exposure ([[basic.link]](basic.link "6.7Program and linkage"))
is deprecated[.](#1.sentence-1)
[*Note [1](#note-1)*:
Such a declaration in an importable module unit is ill-formed[.](#1.sentence-2)
— *end note*]
[*Example [1](#example-1)*: namespace {struct A {void f() {}};} A h(); // deprecated: not internal linkageinline void g() {A().f();} // deprecated: inline and not internal linkage — *end example*]

View File

@@ -0,0 +1,34 @@
[depr.locale.category]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.19 Deprecated locale category facets [depr.locale.category]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L709)
The ctype locale category includes the following facets
as if they were specified
in Table [91](locale.category#tab:locale.category.facets "Table 91: Locale category facets") of [[locale.category]](locale.category "28.3.3.1.2.1Type locale::category")[.](#1.sentence-1)
codecvt<char16_t, char, mbstate_t> codecvt<char32_t, char, mbstate_t> codecvt<char16_t, char8_t, mbstate_t> codecvt<char32_t, char8_t, mbstate_t>
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L721)
The ctype locale category includes the following facets
as if they were specified
in Table [92](locale.category#tab:locale.spec "Table 92: Required specializations") of [[locale.category]](locale.category "28.3.3.1.2.1Type locale::category")[.](#2.sentence-1)
codecvt_byname<char16_t, char, mbstate_t> codecvt_byname<char32_t, char, mbstate_t> codecvt_byname<char16_t, char8_t, mbstate_t> codecvt_byname<char32_t, char8_t, mbstate_t>
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L733)
The following class template specializations are required
in addition to those specified in [[locale.codecvt]](locale.codecvt "28.3.4.2.5Class template codecvt")[.](#3.sentence-1)
The specializations codecvt<char16_t, char, mbstate_t> andcodecvt<char16_t, char8_t, mbstate_t> convert between the UTF-16 and UTF-8 encoding forms, andthe specializations codecvt<char32_t, char, mbstate_t> andcodecvt<char32_t, char8_t, mbstate_t> convert between the UTF-32 and UTF-8 encoding forms[.](#3.sentence-2)

184
cppdraft/depr/meta/types.md Normal file
View File

@@ -0,0 +1,184 @@
[depr.meta.types]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.13 Deprecated type traits [depr.meta.types]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L283)
The header [<type_traits>](meta.type.synop#header:%3ctype_traits%3e "21.3.3Header <type_­traits> synopsis[meta.type.synop]") has the following addition:namespace std {template<class T> struct is_trivial; template<class T> constexpr bool is_trivial_v = is_trivial<T>::value; template<class T> struct is_pod; template<class T> constexpr bool is_pod_v = is_pod<T>::value; template<size_t Len, size_t Align = *default-alignment*> // *see below*struct aligned_storage; template<size_t Len, size_t Align = *default-alignment*> // *see below*using [aligned_storage_t](#lib:aligned_storage_t "D.13Deprecated type traits[depr.meta.types]") = typename aligned_storage<Len, Align>::type; template<size_t Len, class... Types>struct aligned_union; template<size_t Len, class... Types>using [aligned_union_t](#lib:aligned_union_t "D.13Deprecated type traits[depr.meta.types]") = typename aligned_union<Len, Types...>::type;}
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L303)
The behavior of a program that adds specializations for
any of the templates defined in this subclause is undefined,
unless explicitly permitted by the specification of the corresponding template[.](#2.sentence-1)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L308)
A [*trivial class*](#def:class,trivial "D.13Deprecated type traits[depr.meta.types]") is a class that is trivially copyable and
has one or more eligible default constructors, all of which are trivial[.](#3.sentence-1)
[*Note [1](#note-1)*:
In particular,
a trivial class does not have virtual functions or virtual base classes[.](#3.sentence-2)
— *end note*]
A [*trivial type*](#def:type,trivial "D.13Deprecated type traits[depr.meta.types]") is a scalar type, a trivial class,
an array of such a type, or a cv-qualified version of one of these types[.](#3.sentence-3)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L319)
A [*POD class*](#def:POD_class) is a class that is both a trivial class and a
standard-layout class, and has no non-static data members of type non-POD class
(or array thereof)[.](#4.sentence-1)
A [*POD type*](#def:POD_type) is a scalar type, a POD class, an array
of such a type, or a cv-qualified version of one of these types[.](#4.sentence-2)
[🔗](#lib:is_trivial)
`template<class T> struct is_trivial;
`
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L332)
*Preconditions*: remove_all_extents_t<T> shall be a complete type or cv void[.](#5.sentence-1)
[6](#6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L336)
*Remarks*: is_trivial<T> is a *Cpp17UnaryTypeTrait* ([[meta.rqmts]](meta.rqmts "21.3.2Requirements"))
with a base characteristic of true_type if T is a trivial type,
and false_type otherwise[.](#6.sentence-1)
[7](#7)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L343)
[*Note [2](#note-2)*:
It is unspecified
whether a closure type ([[expr.prim.lambda.closure]](expr.prim.lambda.closure "7.5.6.2Closure types")) is a trivial type[.](#7.sentence-1)
— *end note*]
[🔗](#lib:is_pod)
`template<class T> struct is_pod;
`
[8](#8)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L356)
*Preconditions*: remove_all_extents_t<T> shall be a complete type or cv void[.](#8.sentence-1)
[9](#9)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L360)
*Remarks*: is_pod<T> is a [*Cpp17UnaryTypeTrait*](meta.rqmts#:Cpp17UnaryTypeTrait "21.3.2Requirements[meta.rqmts]") ([[meta.rqmts]](meta.rqmts "21.3.2Requirements"))
with a base characteristic of true_type if T is a POD type,
and false_type otherwise[.](#9.sentence-1)
[10](#10)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L367)
[*Note [3](#note-3)*:
It is unspecified whether a closure type ([[expr.prim.lambda.closure]](expr.prim.lambda.closure "7.5.6.2Closure types")) is a POD type[.](#10.sentence-1)
— *end note*]
[🔗](#lib:aligned_storage)
`template<size_t Len, size_t Align = default-alignment>
struct aligned_storage;
`
[11](#11)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L380)
The value of *default-alignment* is the most
stringent alignment requirement for any object type whose size
is no greater than Len ([[basic.types]](basic.types "6.9Types"))[.](#11.sentence-1)
[12](#12)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L385)
*Mandates*: Len is not zero[.](#12.sentence-1)
Align is equal to alignof(T) for some type T or
to *default-alignment*[.](#12.sentence-2)
[13](#13)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L391)
The member typedef type denotes a trivial standard-layout type
suitable for use as uninitialized storage for any object
whose size is at most Len and
whose alignment is a divisor of Align[.](#13.sentence-1)
[14](#14)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L397)
[*Note [4](#note-4)*:
Uses of aligned_storage<Len, Align>::type can be replaced
by an array std::byte[Len] declared with alignas(Align)[.](#14.sentence-1)
— *end note*]
[15](#15)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L403)
[*Note [5](#note-5)*:
A typical implementation would define aligned_storage as:template<size_t Len, size_t Alignment>struct aligned_storage {typedef struct {alignas(Alignment) unsigned char __data[Len]; } type;};
— *end note*]
[🔗](#lib:aligned_union)
`template<size_t Len, class... Types>
struct aligned_union;
`
[16](#16)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L425)
*Mandates*: At least one type is provided[.](#16.sentence-1)
Each type in the template parameter pack Types is a complete object type[.](#16.sentence-2)
[17](#17)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L431)
The member typedef type denotes a trivial standard-layout type
suitable for use as uninitialized storage for any object
whose type is listed in Types;
its size shall be at least Len[.](#17.sentence-1)
The static member alignment_value is an integral constant of type size_t whose value is the strictest alignment of all types listed in Types[.](#17.sentence-2)

View File

@@ -0,0 +1,23 @@
[depr.move.iter.elem]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.18 Deprecated move_iterator access [depr.move.iter.elem]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L683)
The following member is declared in addition to those members
specified in [[move.iter.elem]](move.iter.elem "24.5.4.6Element access"):namespace std {template<class Iterator>class move_iterator {public:constexpr pointer operator->() const; };}
[🔗](#lib:operator-%3e,move_iterator)
`constexpr pointer operator->() const;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L702)
*Returns*: current[.](#2.sentence-1)

View File

@@ -0,0 +1,37 @@
[depr.numeric.limits.has.denorm]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.10 has_denorm members in numeric_limits [depr.numeric.limits.has.denorm]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L181)
The following type is defined
in addition to those specified in [<limits>](limits.syn#header:%3climits%3e "17.3.3Header <limits> synopsis[limits.syn]"):namespace std {enum [float_denorm_style](#lib:float_denorm_style "D.10has_­denorm members in numeric_­limits[depr.numeric.limits.has.denorm]") {[denorm_indeterminate](#lib:float_denorm_style,denorm_indeterminate "D.10has_­denorm members in numeric_­limits[depr.numeric.limits.has.denorm]") = -1, [denorm_absent](#lib:float_denorm_style,denorm_absent "D.10has_­denorm members in numeric_­limits[depr.numeric.limits.has.denorm]") = 0, [denorm_present](#lib:float_denorm_style,denorm_present "D.10has_­denorm members in numeric_­limits[depr.numeric.limits.has.denorm]") = 1};}
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L194)
The following members are defined
in addition to those specified in [[numeric.limits.general]](numeric.limits.general "17.3.5.1General"):static constexpr float_denorm_style has_denorm = denorm_absent;static constexpr bool has_denorm_loss = false;
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L206)
The values of has_denorm and has_denorm_loss of
specializations of numeric_limits are unspecified[.](#3.sentence-1)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L210)
The following members of the specialization numeric_limits<bool> are defined
in addition to those specified in [[numeric.special]](numeric.special "17.3.5.3numeric_­limits specializations"):
[🔗](#lib:float_denorm_style,numeric_limits)
static constexpr float_denorm_style has_denorm = denorm_absent;static constexpr bool has_denorm_loss = false;

88
cppdraft/depr/relops.md Normal file
View File

@@ -0,0 +1,88 @@
[depr.relops]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.14 Relational operators [depr.relops]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L444)
The header [<utility>](utility.syn#header:%3cutility%3e "22.2.1Header <utility> synopsis[utility.syn]") has the following additions:
namespace std::rel_ops {template<class T> bool operator!=(const T&, const T&); template<class T> bool operator> (const T&, const T&); template<class T> bool operator<=(const T&, const T&); template<class T> bool operator>=(const T&, const T&);}
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L456)
To avoid redundant definitions of operator!= out of operator== and operators >, <=, and >= out of operator<,
the library provides the following:
[🔗](#lib:operator!=)
`template<class T> bool operator!=(const T& x, const T& y);
`
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L467)
*Preconditions*: T meets the *Cpp17EqualityComparable* requirements (Table [28](utility.arg.requirements#tab:cpp17.equalitycomparable "Table 28: Cpp17EqualityComparable requirements"))[.](#3.sentence-1)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L471)
*Returns*: !(x == y)[.](#4.sentence-1)
[🔗](#lib:operator%3e)
`template<class T> bool operator>(const T& x, const T& y);
`
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L482)
*Preconditions*: T meets the *Cpp17LessThanComparable* requirements (Table [29](utility.arg.requirements#tab:cpp17.lessthancomparable "Table 29: Cpp17LessThanComparable requirements"))[.](#5.sentence-1)
[6](#6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L486)
*Returns*: y < x[.](#6.sentence-1)
[🔗](#lib:operator%3c=)
`template<class T> bool operator<=(const T& x, const T& y);
`
[7](#7)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L497)
*Preconditions*: T meets the *Cpp17LessThanComparable* requirements (Table [29](utility.arg.requirements#tab:cpp17.lessthancomparable "Table 29: Cpp17LessThanComparable requirements"))[.](#7.sentence-1)
[8](#8)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L501)
*Returns*: !(y < x)[.](#8.sentence-1)
[🔗](#lib:operator%3e=)
`template<class T> bool operator>=(const T& x, const T& y);
`
[9](#9)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L512)
*Preconditions*: T meets the *Cpp17LessThanComparable* requirements (Table [29](utility.arg.requirements#tab:cpp17.lessthancomparable "Table 29: Cpp17LessThanComparable requirements"))[.](#9.sentence-1)
[10](#10)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L516)
*Returns*: !(x < y)[.](#10.sentence-1)

View File

@@ -0,0 +1,18 @@
[depr.static.constexpr]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.7 Redeclaration of static constexpr data members [depr.static.constexpr]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L148)
For compatibility with prior revisions of C++, a constexpr static data member may be redundantly redeclared outside the class with no
initializer ([[basic.def]](basic.def "6.2Declarations and definitions"), [[class.static.data]](class.static.data "11.4.9.3Static data members"))[.](#1.sentence-1)
This usage is deprecated[.](#1.sentence-2)
[*Example [1](#example-1)*: struct A {static constexpr int n = 5; // definition (declaration in C++ 2014)};
constexpr int A::n; // redundant declaration (definition in C++ 2014) — *end example*]

View File

@@ -0,0 +1,12 @@
[depr.template.template]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.9 template keyword before qualified names [depr.template.template]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L174)
The use of the keyword template before the qualified name of a class or alias template
without a template argument list is deprecated ([[temp.names]](temp.names "13.3Names of template specializations"))[.](#1.sentence-1)

77
cppdraft/depr/tuple.md Normal file
View File

@@ -0,0 +1,77 @@
[depr.tuple]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.15 Tuple [depr.tuple]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L523)
The header [<tuple>](tuple.syn#header:%3ctuple%3e "22.4.2Header <tuple> synopsis[tuple.syn]") has the following additions:namespace std {template<class T> struct tuple_size<volatile T>; template<class T> struct tuple_size<const volatile T>; template<size_t I, class T> struct tuple_element<I, volatile T>; template<size_t I, class T> struct tuple_element<I, const volatile T>;}
[🔗](#itemdecl:1)
`template<class T> struct tuple_size<volatile T>;
template<class T> struct tuple_size<const volatile T>;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L541)
Let TS denote tuple_size<T> of the cv-unqualified type T[.](#2.sentence-1)
If the expression TS::value is well-formed
when treated as an [unevaluated operand](expr.context#def:unevaluated_operand "7.2.3Context dependence[expr.context]"),
then specializations of each of the two templates meet
the [*Cpp17TransformationTrait*](meta.rqmts#:Cpp17TransformationTrait "21.3.2Requirements[meta.rqmts]") requirements with a base characteristic ofintegral_constant<size_t, TS::value>[.](#2.sentence-2)
Otherwise, they have no member value[.](#2.sentence-3)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L550)
Access checking is performed as if
in a context unrelated to TS and T[.](#3.sentence-1)
Only the validity of the immediate context of the expression is considered[.](#3.sentence-2)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L555)
In addition to being available via inclusion of the [<tuple>](tuple.syn#header:%3ctuple%3e "22.4.2Header <tuple> synopsis[tuple.syn]") header,
the two templates are available when any of the headers[<array>](array.syn#header:%3carray%3e "23.3.2Header <array> synopsis[array.syn]"),[<ranges>](ranges.syn#header:%3cranges%3e "25.2Header <ranges> synopsis[ranges.syn]"), or[<utility>](utility.syn#header:%3cutility%3e "22.2.1Header <utility> synopsis[utility.syn]") are included[.](#4.sentence-1)
[🔗](#itemdecl:2)
`template<size_t I, class T> struct tuple_element<I, volatile T>;
template<size_t I, class T> struct tuple_element<I, const volatile T>;
`
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L570)
Let TE denote tuple_element_t<I, T> of the cv-unqualified type T[.](#5.sentence-1)
Then specializations of each of the two templates meet
the [*Cpp17TransformationTrait*](meta.rqmts#:Cpp17TransformationTrait "21.3.2Requirements[meta.rqmts]") requirements
with a member typedef type that names the following type:
- [(5.1)](#5.1)
for the first specialization, add_volatile_t<TE>, and
- [(5.2)](#5.2)
for the second specialization, add_cv_t<TE>[.](#5.sentence-2)
[6](#6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L581)
In addition to being available via inclusion of the [<tuple>](tuple.syn#header:%3ctuple%3e "22.4.2Header <tuple> synopsis[tuple.syn]") header,
the two templates are available when any of the headers[<array>](array.syn#header:%3carray%3e "23.3.2Header <array> synopsis[array.syn]"),[<ranges>](ranges.syn#header:%3cranges%3e "25.2Header <ranges> synopsis[ranges.syn]"), or[<utility>](utility.syn#header:%3cutility%3e "22.2.1Header <utility> synopsis[utility.syn]") are included[.](#6.sentence-1)

51
cppdraft/depr/variant.md Normal file
View File

@@ -0,0 +1,51 @@
[depr.variant]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.16 Variant [depr.variant]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L592)
The header [<variant>](variant.syn#header:%3cvariant%3e "22.6.2Header <variant> synopsis[variant.syn]") has the following additions:namespace std {template<class T> struct variant_size<volatile T>; template<class T> struct variant_size<const volatile T>; template<size_t I, class T> struct variant_alternative<I, volatile T>; template<size_t I, class T> struct variant_alternative<I, const volatile T>;}
[🔗](#itemdecl:1)
`template<class T> struct variant_size<volatile T>;
template<class T> struct variant_size<const volatile T>;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L610)
Let VS denote variant_size<T> of the cv-unqualified type T[.](#2.sentence-1)
Then specializations of each of the two templates meet
the [*Cpp17UnaryTypeTrait*](meta.rqmts#:Cpp17UnaryTypeTrait "21.3.2Requirements[meta.rqmts]") requirements
with a base characteristic of integral_constant<size_t, VS::value>[.](#2.sentence-2)
[🔗](#itemdecl:2)
`template<size_t I, class T> struct variant_alternative<I, volatile T>;
template<size_t I, class T> struct variant_alternative<I, const volatile T>;
`
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L624)
Let VA denote variant_alternative<I, T> of the cv-unqualified type T[.](#3.sentence-1)
Then specializations of each of the two templates meet
the [*Cpp17TransformationTrait*](meta.rqmts#:Cpp17TransformationTrait "21.3.2Requirements[meta.rqmts]") requirements
with a member typedef type that names the following type:
- [(3.1)](#3.1)
for the first specialization, add_volatile_t<VA::type>, and
- [(3.2)](#3.2)
for the second specialization, add_cv_t<VA::type>[.](#3.sentence-2)

View File

@@ -0,0 +1,45 @@
[depr.volatile.type]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.4 Deprecated volatile types [depr.volatile.type]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L60)
Postfix ++ and -- expressions ([[expr.post.incr]](expr.post.incr "7.6.1.6Increment and decrement")) and
prefix ++ and -- expressions ([[expr.pre.incr]](expr.pre.incr "7.6.2.3Increment and decrement"))
of volatile-qualified arithmetic and pointer types are deprecated[.](#1.sentence-1)
[*Example [1](#example-1)*: volatile int velociraptor;++velociraptor; // deprecated — *end example*]
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L73)
Certain assignments
where the left operand is a volatile-qualified non-class type
are deprecated; see [[expr.assign]](expr.assign "7.6.19Assignment and compound assignment operators")[.](#2.sentence-1)
[*Example [2](#example-2)*: int neck, tail;volatile int brachiosaur;
brachiosaur = neck; // OK tail = brachiosaur; // OK tail = brachiosaur = neck; // deprecated brachiosaur += neck; // OK — *end example*]
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L90)
A function type ([[dcl.fct]](dcl.fct "9.3.4.6Functions"))
with a parameter with volatile-qualified type or
with a volatile-qualified return type is deprecated[.](#3.sentence-1)
[*Example [3](#example-3)*: volatile struct amber jurassic(); // deprecatedvoid trex(volatile short left_arm, volatile short right_arm); // deprecatedvoid fly(volatile struct pterosaur* pteranodon); // OK — *end example*]
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L104)
A structured binding ([[dcl.struct.bind]](dcl.struct.bind "9.7Structured binding declarations")) of a volatile-qualified type
is deprecated[.](#4.sentence-1)
[*Example [4](#example-4)*: struct linhenykus { short forelimb; };void park(linhenykus alvarezsauroid) {volatile auto [what_is_this] = alvarezsauroid; // deprecated// ...} — *end example*]