std::experi...t::operator=(3)
πΈ std::experi...t::operator=(3) πΈ
okay bestie, welcome to std::experi...t::operator=(3), straight out of the C++ Standard Libary manual. This page is all about assignment for std::experimental::propagate_const, and the NAME is literally std::experimental::propagate_const::operator= β say it with me. π
β¨ NAME β¨
std::experimental::propagate_const::operator= β yep, that's the whole name, iconic and slightly mysterious.
π Synopsis π
Here's the synopsis exactly as the page lays it out, bestie β don't let the line wrapping jump-scare you:
constexpr propagate_const& operator=( (1) (library
fundamentals TS v2)
propagate_const&& p ) = default;
template< class U >
constexpr propagate_const& operator=( (2) (library
fundamentals TS v2)
propagate_const<U>&& pu );
template< class U > (3) (library
fundamentals TS v2)
constexpr propagate_const& operator=( U&& u );
propagate_const& operator=( const propagate_const& (4) (library
fundamentals TS v2)
) = delete;
First, let t_ designate the private data member that is the wrapped pointer-like object. Got it? Good. Now the numbered lore:
- This one is an explicitly defaulted move assignment operator that move assigns
this->t_fromp.t_. - Assigns
std::move(pu.t_)tothis->t_. This overload participates in overload resolution only ifUis implicitly convertible toT. - Assigns
std::forward<U>(u)tothis->t_. This overload participates in overload resolution only ifUis implicitly convertible toTandstd::decay_t<U>is not a specialization ofpropagate_const. - Copy assignment operator is explicitly deleted.
propagate_constis non-copyable. No cap, no copying, periodt. π
π Parameters π
pβ anotherpropagate_constobject to move frompuβ anotherpropagate_constobject of a different specialization to move fromuβ another object to assign to the contained pointer
π«Ά Return value π«Ά
The return value is *this.
Sign-off time, bestie: this page's source/version is http://cppreference.com, dated 2024.06.10, and its page id is std::experi...t::operator=(3). Stay slaying πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms