Namespaces
Variants

std::experimental::ranges::tagged<Base,Tags...>:: tagged

From cppreference.net
using Base :: Base ;
(1)
tagged ( ) = default ;
(2)
tagged ( tagged && that ) = default ;
(3)
tagged ( const tagged & that ) = default ;
(4)
tagged ( Base && that ) noexcept ( std:: is_nothrow_move_constructible < Base > :: value )
requires MoveConstructible < Base > ;
(5)
tagged ( const Base & that ) noexcept ( std:: is_nothrow_copy_constructible < Base > :: value )
requires CopyConstructible < Base > ;
(6)
template < class Other >

requires Constructible < Base, Other >
constexpr tagged ( ranges:: tagged < Other, Tags... > && that )

noexcept ( std:: is_nothrow_constructible < Base, Other > :: value ) ;
(7)
template < class Other >

requires Constructible < Base, const Other & >

constexpr tagged ( const ranges:: tagged < Other, Tags... > & that ) ;
(8)

构造一个 tagged 对象。

1) tagged<Base, Tags...> 继承 Base 的构造函数。
2-4) tagged 具有默认的默认构造函数、复制构造函数和移动构造函数,这些构造函数会调用 Base 的对应构造函数。
5) Base 转换移动构造函数。使用 std :: move ( that ) 初始化 Base 子对象。
6) Base 转换复制构造函数。使用 that 初始化 Base 子对象。
7) 从具有匹配标签的不同 tagged 特化版本转换移动构造函数。使用 static_cast < Other && > ( that ) 初始化 Base 子对象。
8) 从具有匹配标签的不同 tagged 特化版本转换复制构造函数。使用 static_cast < const Other & > ( that ) 初始化 Base 子对象。