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 argumentT
must 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
t
to an r-value reference so that it can be used to construct or be assigned to a (non-reference) object of typeT
. -
Replace the
dest
withsrc
, and return the old value indest
. -
Returns the size of the type
T
. -
Swaps the objects
lhs
andrhs
. -
Swaps the objects
lhs
andrhs
. -
Moves from
t
and constructs a newT
in its place. Returns the old value oft
. -
Moves from
t
and destroys the object att
. Returns the old value oft
. -
Copies from
t
and destroys the object att
. Returns the old value oft
.
Concepts
-
A
Clone
type can make a new copy of itself. -
Determines if
T
has an optimized pathT::clone_from(const T&)
that can be used fromclone_into
. -
A
CloneOrRef
object or reference of typeT
can be cloned to construct a newT
. -
A
Copy
type can be copied to construct a new object and can be assigned to by copy. -
A
CopyOrRef
object or reference of typeT
can be copied to construct a newT
. -
Matches types which are
CopyOrRef
or 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
Move
type can be moved-from to construct a new object of the same type and can be assigned to by move. -
A
MoveOrRef
object or reference of typeT
can be moved to construct a newT
. -
Matches types which are
MoveOrRef
or arevoid
. -
A
NeverValueField
type has a field with a never-value. -
A
TrivialCopy
type isCopy
but 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
T
can be relocated withptr::copy
.
Type Aliases
-
Performs reference collapsing, removing rvalue references but leaving lvalue references untouched.