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

来自cppreference.com
 
 
实验性
技术规范
文件系统库 (文件系统 TS)
库基础 (库基础 TS)
库基础 2 (库基础 TS v2)
库基础 3 (库基础 TS v3)
并行扩展 (并行 TS)
并行扩展 2 (并行 TS v2)
并发扩展 (并发 TS)
并发扩展 2 (并发 TS v2)
概念 (概念 TS)
范围 (范围 TS)
反射 (反射 TS)
数学特殊函数 (特殊函数 TR)
实验性非 TS 功能特性
模式匹配
线性代数
std::execution
契约
2D 图形
 
 
通用工具库
工具组件
函数对象
元编程与类型特性
带标签对偶与元组
                          
标签说明符
                                      
                          
 
 
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 子对象。