Change:
Remove
uncaught_exception. Rationale:
The function did not have a clear specification when multiple exceptions were
active, and has been superseded by
uncaught_exceptions. Effect on original feature:
A valid C++ 2017 program that calls
std::uncaught_exception may fail
to compile
. It might be revised to use
std::uncaught_exceptions instead,
for clear and portable semantics
.Change:
Remove support for adaptable function API
. Rationale:
The deprecated support relied on a limited convention that could not be
extended to support the general case or new language features
. It has been
superseded by direct language support with
decltype, and by the
std::bind and
std::not_fn function templates
. Effect on original feature:
A valid C++ 2017 program that relies on the presence of
result_type,
argument_type,
first_argument_type, or
second_argument_type in a standard library class may fail to compile
. A
valid C++ 2017 program that calls
not1 or
not2, or uses the
class templates
unary_negate or
binary_negate, may fail to
compile
.Change:
Remove redundant members from
std::allocator. Rationale:
std::allocator was overspecified, encouraging direct usage in user containers
rather than relying on
std::allocator_traits, leading to poor containers
. Effect on original feature:
A valid C++ 2017 program that directly makes use of the
pointer,
const_pointer,
reference,
const_reference,
rebind,
address,
construct,
destroy, or
max_size members of
std::allocator, or that directly calls
allocate with an additional hint argument, may fail to compile
. Change:
Remove temporary buffers API
. Rationale:
The temporary buffer facility was intended to provide an efficient optimization
for small memory requests, but there is little evidence this was achieved in
practice, while requiring the user to provide their own exception-safe wrappers
to guard use of the facility in many cases
. Effect on original feature:
A valid C++ 2017 program that calls
get_temporary_buffer or
return_temporary_buffer may fail to compile
. Change:
Remove
shared_ptr::unique. Rationale:
The result of a call to this member function is not reliable in the presence of
multiple threads and weak pointers
. The member function
use_count is
similarly unreliable, but has a clearer contract in such cases, and remains
available for well defined use in single-threaded cases
. Effect on original feature:
A valid C++ 2017 program that calls
unique on a
shared_ptr
object may fail to compile
. Affected subclause: [depr.meta.types]
Change:
Remove deprecated type traits
. Rationale:
The traits had unreliable or awkward interfaces
. The
is_literal_type
trait provided no way to detect which subset of constructors and member
functions of a type were declared
constexpr. The
result_of
trait had a surprising syntax that could not report the result of a regular
function type
. It has been superseded by the
invoke_result trait
. Effect on original feature:
A valid C++ 2017 program that relies on the
is_literal_type or
result_of type traits, on the
is_literal_type_v variable template,
or on the
result_of_t alias template may fail to compile
.