|
1085 | 1085 | and
|
1086 | 1086 | \tcode{<unordered_set>}.
|
1087 | 1087 | In addition the following C compatibility headers are new:
|
1088 |
| -\tcode{<ccomplex>}, |
1089 | 1088 | \tcode{<cfenv>},
|
1090 | 1089 | \tcode{<cinttypes>},
|
1091 |
| -\tcode{<cstdalign>}, |
1092 |
| -\tcode{<cstdbool>}, |
1093 | 1090 | \tcode{<cstdint>},
|
1094 |
| -\tcode{<ctgmath>}, |
1095 | 1091 | and
|
1096 | 1092 | \tcode{<cuchar>}.
|
1097 | 1093 | Valid \CppIII{} code that \tcode{\#include}{s} headers with these names may be
|
|
1186 | 1182 | have different runtime behavior.
|
1187 | 1183 |
|
1188 | 1184 | \diffref{refwrap}, \ref{arithmetic.operations}, \ref{comparisons},
|
1189 |
| -\ref{logical.operations}, \ref{bitwise.operations}, \ref{depr.negators} |
| 1185 | +\ref{logical.operations}, \ref{bitwise.operations} |
1190 | 1186 | \change Standard function object types no longer derived from
|
1191 | 1187 | \tcode{std::unary_function} or \tcode{std::binary_function}.
|
1192 | 1188 | \rationale Superseded by new feature; \tcode{unary_function} and
|
|
1987 | 1983 | }
|
1988 | 1984 | \end{codeblock}
|
1989 | 1985 |
|
| 1986 | +\rSec2[diff.cpp17.except]{\ref{except}: exception handling} |
| 1987 | + |
| 1988 | +\diffref{except.spec} |
| 1989 | +\change Remove \tcode{throw()} exception specification. |
| 1990 | +\rationale |
| 1991 | +The empty dynamic exception specification was retained for one additional \Cpp{} |
| 1992 | +Standard to ease the transition away from this feature. |
| 1993 | +\effect |
| 1994 | +A valid \CppXVII{} function declaration, member function declaration, function |
| 1995 | +pointer declaration, or function reference declaration that uses \tcode{throw()} |
| 1996 | +for its exception specification will be rejected as ill-formed in this |
| 1997 | +International Standard. It should simply be replaced with \tcode{noexcept} for no |
| 1998 | +change of meaning since \CppXVII{}. |
| 1999 | + |
1990 | 2000 | \rSec2[diff.cpp17.library]{\ref{library}: library introduction}
|
1991 | 2001 |
|
1992 | 2002 | \diffref{headers}
|
|
2001 | 2011 | Valid \CppXVII{} code that \tcode{\#include}{s} headers with these names may be
|
2002 | 2012 | invalid in this International Standard.
|
2003 | 2013 |
|
| 2014 | +\diffref{headers} |
| 2015 | +\change Remove vacuous \Cpp{} header files. |
| 2016 | +\rationale |
| 2017 | +The empty headers implied a false requirement to achieve C compatibility with the \Cpp{} headers. |
| 2018 | +\effect |
| 2019 | +A valid \CppXVII{} program that \tcode{\#include}{s} any of the following headers may fail to compile: |
| 2020 | +\tcode{<ccomplex>}, |
| 2021 | +\tcode{<ciso646>}, |
| 2022 | +\tcode{<cstdalign>}, |
| 2023 | +\tcode{<cstdbool>}, and |
| 2024 | +\tcode{<ctgmath>}. |
| 2025 | +The \tcode{\#include} directives can simply be removed with no loss of meaning. |
| 2026 | + |
2004 | 2027 | \rSec2[diff.cpp17.containers]{\ref{containers}: containers library}
|
2005 | 2028 |
|
2006 | 2029 | \diffrefs{forwardlist}{list}
|
|
2013 | 2036 | Translation units compiled against this version of \Cpp{} may be incompatible with
|
2014 | 2037 | translation units compiled against \CppXVII{}, either failing to link or having undefined behavior.
|
2015 | 2038 |
|
| 2039 | +\rSec2[diff.cpp17.depr]{\ref{depr}: compatibility features} |
| 2040 | + |
| 2041 | +\change Remove \tcode{uncaught_exception}. |
| 2042 | +\rationale |
| 2043 | +The function did not have a clear specification when multiple exceptions were |
| 2044 | +active, and has been superseded by \tcode{uncaught_exceptions}. |
| 2045 | +\effect |
| 2046 | +A valid \CppXVII{} program that calls \tcode{std::uncaught_exception} may fail |
| 2047 | +to compile. It might be revised to use \tcode{std::uncaught_exceptions} instead, |
| 2048 | +for clear and portable semantics. |
| 2049 | + |
| 2050 | +\change Remove support for adaptable function API. |
| 2051 | +\rationale |
| 2052 | +The deprecated support relied on a limited convention that could not be |
| 2053 | +extended to support the general case or new language features. It has been |
| 2054 | +superseded by direct language support with \tcode{decltype}, and by the |
| 2055 | +\tcode{std::bind} and \tcode{std::not_fn} function templates. |
| 2056 | +\effect |
| 2057 | +A valid \CppXVII{} program that relies on the presence of \tcode{result_type}, |
| 2058 | +\tcode{argument_type}, \tcode{first_argument_type}, or |
| 2059 | +\tcode{second_argument_type} in a standard library class may fail to compile. A |
| 2060 | +valid \CppXVII{} program that calls \tcode{not1} or \tcode{not2}, or uses the |
| 2061 | +class templates \tcode{unary_negate} or \tcode{binary_negate}, may fail to |
| 2062 | +compile. |
| 2063 | + |
| 2064 | +\change Remove redundant members from \tcode{std::allocator}. |
| 2065 | +\rationale |
| 2066 | +\tcode{std::allocator} was overspecified, encouraging direct usage in user containers |
| 2067 | +rather than relying on \tcode{std::allocator_traits}, leading to poor containers. |
| 2068 | +\effect |
| 2069 | +A valid \CppXVII{} program that directly makes use of the \tcode{pointer}, |
| 2070 | +\tcode{const_pointer}, \tcode{reference}, \tcode{const_reference}, |
| 2071 | +\tcode{rebind}, \tcode{address}, \tcode{construct}, \tcode{destroy}, or |
| 2072 | +\tcode{max_size} members of \tcode{std::allocator}, or that directly calls |
| 2073 | +\tcode{allocate} with an additional hint argument, may fail to compile. |
| 2074 | + |
| 2075 | +\change Remove \tcode{raw_memory_iterator}. |
| 2076 | +\rationale |
| 2077 | +The iterator encouraged use of algorithms that might throw exceptions, but did |
| 2078 | +not return the number of elements successfully constructed that might need to |
| 2079 | +be destroyed in order to avoid leaks. |
| 2080 | +\effect |
| 2081 | +A valid \CppXVII{} program that uses this iterator class may fail to compile. |
| 2082 | + |
| 2083 | +\change Remove temporary buffers API. |
| 2084 | +\rationale |
| 2085 | +The temporary buffer facility was intended to provide an efficient optimization |
| 2086 | +for small memory requests, but there is little evidence this was achieved in |
| 2087 | +practice, while requiring the user to provide their own exception-safe wrappers |
| 2088 | +to guard use of the facility in many cases. |
| 2089 | +\effect |
| 2090 | +A valid \CppXVII{} program that calls \tcode{get_temporary_buffer} or |
| 2091 | +\tcode{return_temporary_buffer} may fail to compile. |
| 2092 | + |
| 2093 | +\change Remove \tcode{shared_ptr::unique}. |
| 2094 | +\rationale |
| 2095 | +The result of a call to this member function is not reliable in the presence of |
| 2096 | +multiple threads and weak pointers. The member function \tcode{use_count} is |
| 2097 | +similarly unreliable, but has a clearer contract in such cases, and remains |
| 2098 | +available for well defined use in single-threaded cases. |
| 2099 | +\effect |
| 2100 | +A valid \CppXVII{} program that calls \tcode{unique} on a \tcode{shared_ptr} |
| 2101 | +object may fail to compile. |
| 2102 | + |
| 2103 | +\diffref{depr.meta.types} |
| 2104 | +\change Remove deprecated type traits. |
| 2105 | +\rationale |
| 2106 | +The traits had unreliable or awkward interfaces. The \tcode{is_literal_type} |
| 2107 | +trait provided no way to detect which subset of constructors and member |
| 2108 | +functions of a type were declared \tcode{constexpr}. The \tcode{result_of} |
| 2109 | +trait had a surprising syntax that could not report the result of a regular |
| 2110 | +function type. It has been superseded by the \tcode{invoke_result} trait. |
| 2111 | +\effect |
| 2112 | +A valid \CppXVII{} program that relies on the \tcode{is_literal_type} or |
| 2113 | +\tcode{result_of} type traits, on the \tcode{is_literal_type_v} variable template, |
| 2114 | +or on the \tcode{result_of_t} alias template may fail to compile. |
| 2115 | + |
2016 | 2116 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2017 | 2117 | \rSec1[diff.library]{C standard library}
|
2018 | 2118 | \indextext{library!C standard}%
|
|
2038 | 2138 | nor are the C headers themselves part of \Cpp{}.
|
2039 | 2139 |
|
2040 | 2140 | \pnum
|
2041 |
| -The \Cpp{} headers \tcode{<ccomplex>}\indexhdr{ccomplex}\iref{depr.ccomplex.syn} |
2042 |
| -and \tcode{<ctgmath>}\indexhdr{ctgmath}\iref{depr.ctgmath.syn}, as well |
2043 |
| -as their corresponding C headers \tcode{<complex.h>}\indexhdr{complex.h} |
2044 |
| -and \tcode{<tgmath.h>}\indexhdr{tgmath.h}, do not contain any of the |
2045 |
| -content from the C standard library and instead merely include other headers |
2046 |
| -from the \Cpp{} standard library. |
2047 |
| - |
2048 |
| -\pnum |
2049 |
| -The headers \tcode{<ciso646>}\indexhdr{ciso646}, |
2050 |
| -\tcode{<cstdalign>}\indexhdr{cstdalign}\iref{depr.cstdalign.syn}, |
2051 |
| -and \tcode{<cstdbool>}\indexhdr{cstdbool}\iref{depr.cstdbool.syn} |
2052 |
| -are meaningless in \Cpp{}. Use of |
2053 |
| -the \Cpp{} headers \tcode{<ccomplex>}, \tcode{<cstdalign>}, \tcode{<cstdbool>}, |
2054 |
| -and \tcode{<ctgmath>} is deprecated\iref{depr.c.headers}. |
| 2141 | +The C headers \tcode{<complex.h>}\indexhdr{complex.h} and |
| 2142 | +\tcode{<tgmath.h>}\indexhdr{tgmath.h} do not contain any of the content from |
| 2143 | +the C standard library and instead merely include other headers from the \Cpp{} |
| 2144 | +standard library. |
2055 | 2145 |
|
2056 | 2146 | \rSec2[diff.mods.to.definitions]{Modifications to definitions}
|
2057 | 2147 |
|
|
2104 | 2194 | \tcode{xor_eq}
|
2105 | 2195 | are keywords in this International
|
2106 | 2196 | Standard\iref{lex.key}.
|
2107 |
| -They do not appear as macro names defined in |
2108 |
| -\tcode{<ciso646>}. |
2109 |
| -\indexhdr{ciso646}% |
2110 | 2197 |
|
2111 | 2198 | \rSec3[diff.header.stdalign.h]{Header \tcode{<stdalign.h>}}
|
2112 | 2199 | \indexhdr{stdalign.h}%
|
2113 | 2200 |
|
2114 | 2201 | \pnum
|
2115 | 2202 | The token \tcode{alignas} is a keyword in this International
|
2116 |
| -Standard\iref{lex.key}. It does not appear as a macro name defined |
2117 |
| -in \tcode{<cstdalign>}\indexhdr{cstdalign}\iref{depr.cstdalign.syn}. |
| 2203 | +Standard\iref{lex.key}. |
2118 | 2204 |
|
2119 | 2205 | \rSec3[diff.header.stdbool.h]{Header \tcode{<stdbool.h>}}
|
2120 | 2206 | \indexhdr{stdbool.h}%
|
2121 | 2207 |
|
2122 | 2208 | \pnum
|
2123 | 2209 | The tokens \tcode{bool}, \tcode{true}, and \tcode{false}
|
2124 | 2210 | are keywords in this International Standard\iref{lex.key}.
|
2125 |
| -They do not appear as macro names defined in |
2126 |
| -\tcode{<cstdbool>}\indexhdr{cstdbool}\iref{depr.cstdbool.syn}. |
2127 | 2211 |
|
2128 | 2212 | \rSec3[diff.null]{Macro \tcode{NULL}}
|
2129 | 2213 |
|
|
0 commit comments