cpp/named req/MoveConstructible – cppreference.com

cpp/named req/MoveConstructible

Aus cppreference.com
< cpp

Vorlage:cpp/named req/title Vorlage:cpp/named req/navbar

Specifies that an instance of the type can be constructed from an rvalue argument.

Requirements

The type T satisfies if

Given

  • rv, an rvalue expression of type T
  • u, an arbitrary identifier

The following expressions must be valid and have their specified effects

Notes

A class does not have to implement a move constructor to satisfy this type requirement: a copy constructor that takes a const T& argument can bind rvalue expressions.

If a class implements a move constructor, it may also implement move semantics to take advantage of the fact that the value of rv after construction is unspecified.

See also

Vorlage:cpp/concepts/dsc move constructible