◐ Shell
clean mode source ↗

Концепции C++: CopyAssignable — cppreference.com

Материал из cppreference.com

<metanoindex/>

Specifies that an instance of the type can be copy-assigned (copied).

Эта концепция подразумевает MoveAssignable.

Оригинал:

Текст был переведён автоматически используя Переводчик Google.
Вы можете проверить и исправить перевод. Для инструкций щёлкните сюда.

Требования

Тип должен реализовывать следующие функции:

Оригинал:

The type must implement the following functions:

Текст был переведён автоматически используя Переводчик Google.
Вы можете проверить и исправить перевод. Для инструкций щёлкните сюда.

Type::operator=

<tbody> </tbody>

Type& Type::operator=( Type& other ); Type& Type::operator=( const Type& other ); Type& Type::operator=( volatile Type& other ); Type& Type::operator=( const volatile Type& other );

(Одним из вариантов является достаточным)

Copy assignment operator: assigns the contents of other. The internal state of other must not be modified.

The following expressions must have the specified effects:

Выражение

Оригинал:

Expression

Текст был переведён автоматически используя Переводчик Google.
Вы можете проверить и исправить перевод. Для инструкций щёлкните сюда.

Effects
a = v; a is equivalent to v, where a is an instance of Type and v is an instance of Type. v must be unchanged.

См. также