Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
josuttis_nm_c20_the_complete_guide.pdf
Скачиваний:
44
Добавлен:
27.03.2023
Размер:
5.85 Mб
Скачать

Chapter 24

Deprecated and Removed Features

There are a few features that have been deprecated in C++20 or finally removed.

Implementations might still provide removed features but you cannot rely on that. Implementations might or might not issue a warning if you use deprecated features.

24.1

Deprecated and Removed Core Language Features

The implicit capture of *this is deprecated.

Aggregates may no longer have any user-declared (but not user-provided) constructors.

24.2

Deprecated and Removed Library Features

24.2.1

Deprecated Library Features

The following library features are deprecated since C++20 and should no longer be used:

• The type trait is_pod<>.

Use is_trivial<> or a similar type trait instead.

• Atomic operations for regular shared pointers are deprecated now. Use atomic shared pointers instead.

24.2.2 Removed Library Features

For strings, the member function reserve() can no longer be called with no argument and it no longer shrinks the capacity.

You can no longer write a UTF-8 string to a standard output stream.

701