cptr::basic_ptr::operator=

Assignment operators

Synopses

Declared in <cptr/ptr.hpp>

Compresses p, which must be null or point into the cage. Not for strict_ptr, which needs an explicit s = strict_ptr<T>(p). A literal 0 or NULL lands here too, and stays constant-evaluable.

constexpr
basic_ptr&
operator=(T* p) noexcept
requires (!Strict);
» more...

Null. A template, so that a literal 0 picks the T* overload above (or, for strict_ptr, the null-literal constructor) instead of being ambiguous.

template<class N>
requires std::is_null_pointer_v<N>
constexpr
basic_ptr&
operator=(N value) noexcept;
» more...