[diff.cpp17.depr]

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

## C.3 C++ and ISO C++ 2017 [[diff.cpp17]](diff.cpp17#depr)

### C.3.15 [[depr]](depr "Annex D (normative) Compatibility features"): compatibility features [diff.cpp17.depr]

[1](#1)

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

**Change:** Remove uncaught_exception[.](#1.sentence-1)

  


**Rationale:** The function did not have a clear specification when multiple exceptions were
active, and has been superseded by uncaught_exceptions[.](#1.sentence-2)

  


**Effect on original feature:** A valid C++ 2017 program that calls std​::​uncaught_exception may fail
to compile[.](#1.sentence-3)

It can be revised to use std​::​uncaught_exceptions instead,
for clear and portable semantics[.](#1.sentence-4)

[2](#2)

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

**Change:** Remove support for adaptable function API[.](#2.sentence-1)  

**Rationale:** The deprecated support relied on a limited convention that could not be
extended to support the general case or new language features[.](#2.sentence-2)

It has been
superseded by direct language support with decltype, and by thestd​::​bind and std​::​not_fn function templates[.](#2.sentence-3)

  


**Effect on original feature:** A valid C++ 2017 program that relies on the presence of result_type,argument_type, first_argument_type, orsecond_argument_type in a standard library class may fail to compile[.](#2.sentence-4)

A
valid C++ 2017 program that calls not1 or not2, or uses the
class templates unary_negate or binary_negate, may fail to
compile[.](#2.sentence-5)

[3](#3)

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

**Change:** Remove redundant members from std​::​allocator[.](#3.sentence-1)

  


**Rationale:** std​::​allocator was overspecified, encouraging direct usage in user containers
rather than relying on std​::​allocator_traits, leading to poor containers[.](#3.sentence-2)

  


**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, ormax_size members of std​::​allocator, or that directly callsallocate with an additional hint argument, may fail to compile[.](#3.sentence-3)

[4](#4)

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

**Change:** Remove raw_storage_iterator[.](#4.sentence-1)

  


**Rationale:** The iterator encouraged use of potentially-throwing algorithms, but did
not return the number of elements successfully constructed,
as would be necessary to destroy them[.](#4.sentence-2)

  


**Effect on original feature:** A valid C++ 2017 program that uses this iterator class may fail to compile[.](#4.sentence-3)

[5](#5)

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

**Change:** Remove temporary buffers API[.](#5.sentence-1)  

**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[.](#5.sentence-2)

  


**Effect on original feature:** A valid C++ 2017 program that calls get_temporary_buffer orreturn_temporary_buffer may fail to compile[.](#5.sentence-3)

[6](#6)

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

**Change:** Remove shared_ptr​::​unique[.](#6.sentence-1)

  


**Rationale:** The result of a call to this member function is not reliable in the presence of
multiple threads and weak pointers[.](#6.sentence-2)

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[.](#6.sentence-3)

  


**Effect on original feature:** A valid C++ 2017 program that calls unique on a shared_ptr object may fail to compile[.](#6.sentence-4)

[7](#7)

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

**Affected subclause:** [[depr.meta.types]](depr.meta.types)  


**Change:** Remove deprecated type traits[.](#7.sentence-1)

  


**Rationale:** The traits had unreliable or awkward interfaces[.](#7.sentence-2)

The is_literal_type trait provided no way to detect which subset of constructors and member
functions of a type were declared constexpr[.](#7.sentence-3)

The result_of trait had a surprising syntax that did not directly support function types[.](#7.sentence-4)

It has been superseded by the invoke_result trait[.](#7.sentence-5)

  


**Effect on original feature:** A valid C++ 2017 program that relies on the is_literal_type orresult_of type traits, on the is_literal_type_v variable template,
or on the result_of_t alias template may fail to compile[.](#7.sentence-6)
