std::experi...::operator=(3)
okay bestie, we're on std::experi...::operator=(3) β the C++ Standard Library page for std::experimental::ranges::tagged's assignment ops. πβ¨
π NAME π
The whole page is about std::experimental::ranges::tagged::operator= β and yes, the NAME section also lists std::experimental::ranges::tagged::operator= again. Double naming, double slay. π
β¨ Synopsis β¨
tagged &operator=( tagged&& that ) = default;
(1)
tagged &operator=( const tagged& that ) = default;
(2)
template< class Other >
requires Assignable<Base&, Other>
(3)
constexpr tagged& operator=( ranges::tagged<Other, Tags...>&& that )
noexcept(std::is_nothrow_assignable<Base&, Other>::value);
template< class Other >
requires Assignable<Base&, const Other&>
(4)
constexpr tagged& operator=( const ranges::tagged<Other, Tags...>&
that );
template< class U >
requires Assignable<Base&, U> && !Same<std::decay_t<U>, tagged>
(5)
constexpr tagged& operator=( U&& that )
noexcept(std::is_nothrow_assignable<Base&, U>::value);
π¦ the overloads, bestie π¦
Assigns the contents of that to *this. No cap. π
1,2)βtaggedhas defaulted copy and move assignment operators that invoke the corresponding assignment operator ofBase. yes, it's giving "delegate to Base" energy.3)β Converting move assignment from a differenttaggedspecialization with matching tags. Equivalent tostatic_cast<Base&>(*this) = static_cast<Other&&>(that);.4)β Converting copy assignment from a differenttaggedspecialization with matching tags. Equivalent tostatic_cast<Base&>(*this) = static_cast<const Other&>(that);.5)β Assignsthatto theBasesubobject. Equivalent tostatic_cast<Base&>(*this) = std::forward<U>(that);.
π«Ά Return value π«Ά
*this. That's it. That's the return value. periodt. π
source/version + date sign-off: http://cppreference.com, 2024.06.10, page std::experi...::operator=(3). bye bestie, go assign something cute π
π«Άβ¨
π¦ 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