Namespace Subspace :: sus :: mem

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 with forward, the template argument T 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 type T.

  • Replace the dest with src, and return the old value in dest.

  • Returns the size of the type T.

  • Swaps the objects lhs and rhs.

  • Swaps the objects lhs and rhs.

  • Moves from t and constructs a new T in its place. Returns the old value of t.

  • Moves from t and destroys the object at t. Returns the old value of t.

  • Copies from t and destroys the object at t. Returns the old value of t.

Concepts

  • A Clone type can make a new copy of itself.

  • Determines if T has an optimized path T::clone_from(const T&) that can be used from clone_into.

  • A CloneOrRef object or reference of type T can be cloned to construct a new T.

  • A Copy type can be copied to construct a new object and can be assigned to by copy.

  • A CopyOrRef object or reference of type T can be copied to construct a new T.

  • Matches types which are CopyOrRef or are void.

  • 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 type T can be moved to construct a new T.

  • Matches types which are MoveOrRef or are void.

  • A NeverValueField type has a field with a never-value.

  • A TrivialCopy type is Copy 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 with ptr::copy.

Type Aliases

  • Performs reference collapsing, removing rvalue references but leaving lvalue references untouched.