Functions
-
Returns the address of an object, regardless of whether a class type overrides
operator&. -
Clones the input either by copying or cloning. Returns a new object of type
T. -
Performs copy-assignment from
source. -
Clones the input either by copying or cloning, producing an object of type
T. As withforward, the template argumentTmust always be specified when calling this function to deduce the correct return type. -
Returns the data size of the type
T. -
Move from non-reference values but pass through and preserve references.
-
Cast
tto an r-value reference so that it can be used to construct or be assigned to a (non-reference) object of typeT. -
Replace the
destwithsrc, and return the old value indest. -
Returns the size of the type
T. -
Swaps the objects
lhsandrhs. -
Swaps the objects
lhsandrhs. -
Moves from
tand constructs a newTin its place. Returns the old value oft. -
Moves from
tand destroys the object att. Returns the old value oft. -
Copies from
tand destroys the object att. Returns the old value oft.
Concepts
-
A
Clonetype can make a new copy of itself. -
Determines if
Thas an optimized pathT::clone_from(const T&)that can be used fromclone_into. -
A
CloneOrRefobject or reference of typeTcan be cloned to construct a newT. -
A
Copytype can be copied to construct a new object and can be assigned to by copy. -
A
CopyOrRefobject or reference of typeTcan be copied to construct a newT. -
Matches types which are
CopyOrRefor arevoid. -
A concept that can be used to constrain a universal reference parameter to ensure the caller provides something that was moved from, akin to receiving by value. This avoids inadvertantly moving out of an lvalue in the caller.
-
A
Movetype can be moved-from to construct a new object of the same type and can be assigned to by move. -
A
MoveOrRefobject or reference of typeTcan be moved to construct a newT. -
Matches types which are
MoveOrRefor arevoid. -
A
NeverValueFieldtype has a field with a never-value. -
A
TrivialCopytype isCopybut may be copied with memcpy() or memmove() instead of calling the copy constructor/assignment. This allows groups of items to be copied in a single operation. -
Tests if a variable of type
Tcan be relocated withptr::copy.
Type Aliases
-
Performs reference collapsing, removing rvalue references but leaving lvalue references untouched.