命名空间
变体
操作

标准库头文件 <type_traits> (C++11)

来自 cppreference.cn
< cpp‎ | header
 
 
标准库头文件
算法
<algorithm>
<numeric>
字符串
<cctype>
<cstring>
<cuchar> (C++11)
<cwchar>
<cwctype>
<string_view> (C++17)
<string>
文本处理
<clocale>
<codecvt> (C++11/17/26*)
<locale>
<regex> (C++11)
<text_encoding> (C++26)   
数值
<cfenv> (C++11)
<cmath>
<complex>
<linalg> (C++26)
<numbers> (C++20)
<random> (C++11)
<simd> (C++26)
<valarray>
时间
<chrono> (C++11)
<ctime>
C 兼容性
<ccomplex> (C++11/17/20*)
<ciso646> (直到 C++20)
<cstdalign> (C++11/17/20*)
<cstdbool> (C++11/17/20*)
<ctgmath> (C++11/17/20*)
 

此头文件是元编程库的一部分。

内容

辅助类
具有指定值的指定类型的编译时常量
(类模板) [编辑]
true_type std::integral_constant<bool, true>
false_type std::integral_constant<bool, false>
基本类型类别
(C++11)
检查类型是否为 void
(类模板) [编辑]
(C++11)(DR*)
检查类型是否为 std::nullptr_t
(类模板) [编辑]
检查类型是否为整型
(类模板) [编辑]
检查类型是否为浮点类型
(类模板) [编辑]
(C++11)
检查类型是否为数组类型
(类模板) [编辑]
(C++11)
检查类型是否为枚举类型
(类模板) [编辑]
(C++11)
检查类型是否为联合体类型
(类模板) [编辑]
(C++11)
检查类型是否为非联合体类类型
(类模板) [编辑]
检查类型是否为函数类型
(类模板) [编辑]
检查类型是否为指针类型
(类模板) [编辑]
检查类型是否为左值引用
(类模板) [编辑]
检查类型是否为右值引用
(类模板) [编辑]
检查类型是否为非静态成员对象指针
(类模板) [编辑]
检查类型是否为非静态成员函数指针
(类模板) [编辑]
复合类型类别
检查类型是否为基本类型
(类模板) [编辑]
检查类型是否为算术类型
(类模板) [编辑]
(C++11)
检查类型是否为标量类型
(类模板) [编辑]
(C++11)
检查类型是否为对象类型
(类模板) [编辑]
检查类型是否为复合类型
(类模板) [编辑]
检查类型是否为左值引用右值引用
(类模板) [编辑]
检查类型是否为指向非静态成员函数或对象的指针
(类模板) [编辑]
类型属性
(C++11)
检查类型是否带有 const 限定符
(类模板) [编辑]
检查类型是否带有 volatile 限定符
(类模板) [编辑]
(C++11)(C++26 中已弃用)
检查类型是否为平凡类型
(类模板) [编辑]
检查类型是否为可平凡复制类型
(类模板) [编辑]
检查类型是否为标准布局类型
(类模板) [编辑]
(C++11)(C++20 中已弃用)
检查类型是否为 Plain-Old Data (POD) 类型
(类模板) [编辑]
(C++11)(C++17 中已弃用)(C++20 中已移除)
检查类型是否为字面类型
(类模板) [编辑]
检查类型对象表示中的每个位是否对其值有贡献
(类模板) [编辑]
(C++11)
检查类型是否为类(但不是联合体)类型且没有非静态数据成员
(类模板) [编辑]
检查类型是否为多态类类型
(类模板) [编辑]
检查类型是否为抽象类类型
(类模板) [编辑]
(C++14)
检查类型是否为 final 类类型
(类模板) [编辑]
检查类型是否为聚合类型
(类模板) [编辑]
检查类型是否为隐式生命周期类型
(类模板) [编辑]
(C++11)
检查类型是否为有符号算术类型
(类模板) [编辑]
检查类型是否为无符号算术类型
(类模板) [编辑]
检查类型是否为已知边界的数组类型
(类模板) [编辑]
检查类型是否为未知边界的数组类型
(类模板) [编辑]
检查类型是否为作用域枚举类型
(类模板) [编辑]
支持的操作
检查类型是否具有特定参数的构造函数
(类模板) [编辑]
检查类型是否具有默认构造函数
(类模板) [编辑]
检查类型是否具有复制构造函数
(类模板) [编辑]
检查类型是否可以从右值引用构造
(类模板) [编辑]
检查类型是否具有特定参数的赋值运算符
(类模板) [编辑]
检查类型是否具有复制赋值运算符
(类模板) [编辑]
检查类型是否具有移动赋值运算符
(类模板) [编辑]
检查类型是否具有非删除的析构函数
(类模板) [编辑]
检查类型是否具有虚析构函数
(类模板) [编辑]
检查类型的对象是否可以与相同或不同类型的对象交换
(类模板) [编辑]
检查引用是否在复制初始化中绑定到临时对象
(类模板) [编辑]
检查引用是否在直接初始化中绑定到临时对象
(类模板) [编辑]
属性查询
获取类型的对齐要求
(类模板) [编辑]
(C++11)
获取数组类型的维度数量
(类模板) [编辑]
(C++11)
获取数组类型沿指定维度的尺寸
(类模板) [编辑]
类型关系
(C++11)
检查两个类型是否相同
(类模板) [编辑]
检查一个类型是否为另一个类型的基类
(类模板) [编辑]
检查一个类型是否为另一个类型的虚基类
(类模板) [编辑]
检查一个类型是否可以转换为另一个类型
(类模板) [编辑]
检查两个类型是否布局兼容
(类模板) [编辑]
检查一个类型是否为另一类型的指针可互转换的(初始)基类
(类模板) [编辑]
检查是否可以使用给定的参数类型调用某个类型(如同通过 std::invoke 调用)
(类模板) [编辑]
Const-volatile 限定符
从给定类型移除 const 和/或 volatile 限定符
(类模板) [编辑]
(C++11)(C++11)(C++11)
向给定类型添加 const 和/或 volatile 限定符
(类模板) [编辑]
引用
从给定类型移除引用
(类模板) [编辑]
向给定类型添加左值右值引用
(类模板) [编辑]
指针
从给定类型移除指针
(类模板) [编辑]
向给定类型添加指针
(类模板) [编辑]
符号修饰符
获取给定整型类型对应的有符号类型
(类模板) [编辑]
获取给定整型类型对应的有符号类型
(类模板) [编辑]
数组
从给定数组类型移除一个维度
(类模板) [编辑]
从给定数组类型移除所有维度
(类模板) [编辑]
其他变换
(C++11 起)(C++23 中已弃用)
定义适合用作给定大小类型的未初始化存储的类型
(类模板) [编辑]
(C++11 起)(C++23 中已弃用)
定义适合用作所有给定类型的未初始化存储的类型
(类模板) [编辑]
(C++11)
应用类型变换,如同按值传递函数参数时一样
(类模板) [编辑]
组合了 std::remove_cvstd::remove_reference
(类模板) [编辑]
(C++11)
有条件地从重载决议中移除函数重载或模板特化
(类模板) [编辑]
根据编译时布尔值选择一个类型或另一个类型
(类模板) [编辑]
确定一组类型的公共类型
(类模板) [编辑]
确定一组类型的公共引用类型
(类模板) [编辑]
获取给定枚举类型的底层整数类型
(类模板) [编辑]
(C++11 起)(C++20 中移除)(C++17 起)
推导使用一组参数调用可调用对象的结果类型
(类模板) [编辑]
(C++17)
void 可变参数别名模板
(别名模板)[编辑]
返回未更改的类型参数
(类模板) [编辑]
(C++20 起)(C++20 起)
获取包装在 std::reference_wrapper 中的引用类型
(类模板) [编辑]
特性操作
可变参数逻辑 AND 元函数
(类模板) [编辑]
可变参数逻辑 OR 元函数
(类模板) [编辑]
(C++17)
逻辑 NOT 元函数
(类模板) [编辑]

函数

成员关系
检查一个类型的对象是否与该类型的指定子对象指针可互转换
(函数模板) [编辑]
检查两个指定类型的公共初始序列中,两个指定的成员是否彼此对应
(函数模板) [编辑]
常量求值语境
检测调用是否发生在常量求值语境内
(函数) [编辑]
在编译时检查指针是否在对象的生命周期内
(函数) [编辑]

[编辑] 概要

namespace std {
  // helper class
  template<class T, T v> struct integral_constant;
 
  template<bool B>
    using bool_constant = integral_constant<bool, B>;
  using true_type  = bool_constant<true>;
  using false_type = bool_constant<false>;
 
  // primary type categories
  template<class T> struct is_void;
  template<class T> struct is_null_pointer;
  template<class T> struct is_integral;
  template<class T> struct is_floating_point;
  template<class T> struct is_array;
  template<class T> struct is_pointer;
  template<class T> struct is_lvalue_reference;
  template<class T> struct is_rvalue_reference;
  template<class T> struct is_member_object_pointer;
  template<class T> struct is_member_function_pointer;
  template<class T> struct is_enum;
  template<class T> struct is_union;
  template<class T> struct is_class;
  template<class T> struct is_function;
 
  // composite type categories
  template<class T> struct is_reference;
  template<class T> struct is_arithmetic;
  template<class T> struct is_fundamental;
  template<class T> struct is_object;
  template<class T> struct is_scalar;
  template<class T> struct is_compound;
  template<class T> struct is_member_pointer;
 
  // type properties
  template<class T> struct is_const;
  template<class T> struct is_volatile;
  template<class T> struct is_trivial;
  template<class T> struct is_trivially_copyable;
  template<class T> struct is_standard_layout;
  template<class T> struct is_empty;
  template<class T> struct is_polymorphic;
  template<class T> struct is_abstract;
  template<class T> struct is_final;
  template<class T> struct is_aggregate;
 
  template<class T> struct is_signed;
  template<class T> struct is_unsigned;
  template<class T> struct is_bounded_array;
  template<class T> struct is_unbounded_array;
  template<class T> struct is_scoped_enum;
 
  template<class T, class... Args> struct is_constructible;
  template<class T> struct is_default_constructible;
  template<class T> struct is_copy_constructible;
  template<class T> struct is_move_constructible;
 
  template<class T, class U> struct is_assignable;
  template<class T> struct is_copy_assignable;
  template<class T> struct is_move_assignable;
 
  template<class T, class U> struct is_swappable_with;
  template<class T> struct is_swappable;
 
  template<class T> struct is_destructible;
 
  template<class T, class... Args> struct is_trivially_constructible;
  template<class T> struct is_trivially_default_constructible;
  template<class T> struct is_trivially_copy_constructible;
  template<class T> struct is_trivially_move_constructible;
 
  template<class T, class U> struct is_trivially_assignable;
  template<class T> struct is_trivially_copy_assignable;
  template<class T> struct is_trivially_move_assignable;
  template<class T> struct is_trivially_destructible;
 
  template<class T, class... Args> struct is_nothrow_constructible;
  template<class T> struct is_nothrow_default_constructible;
  template<class T> struct is_nothrow_copy_constructible;
  template<class T> struct is_nothrow_move_constructible;
 
  template<class T, class U> struct is_nothrow_assignable;
  template<class T> struct is_nothrow_copy_assignable;
  template<class T> struct is_nothrow_move_assignable;
 
  template<class T, class U> struct is_nothrow_swappable_with;
  template<class T> struct is_nothrow_swappable;
 
  template<class T> struct is_nothrow_destructible;
 
  template<class T> struct has_virtual_destructor;
 
  template<class T> struct has_unique_object_representations;
 
  template<class T, class U> struct reference_constructs_from_temporary;
  template<class T, class U> struct reference_converts_from_temporary;
 
  // type property queries
  template<class T> struct alignment_of;
  template<class T> struct rank;
  template<class T, unsigned I = 0> struct extent;
 
  // type relations
  template<class T, class U> struct is_same;
  template<class Base, class Derived> struct is_base_of;
  template<class Base, class Derived> struct is_virtual_base_of;
  template<class From, class To> struct is_convertible;
  template<class From, class To> struct is_nothrow_convertible;
  template<class T, class U> struct is_layout_compatible;
  template<class Base, class Derived> struct is_pointer_interconvertible_base_of;
 
  template<class Fn, class... ArgTypes> struct is_invocable;
  template<class R, class Fn, class... ArgTypes> struct is_invocable_r;
 
  template<class Fn, class... ArgTypes> struct is_nothrow_invocable;
  template<class R, class Fn, class... ArgTypes> struct is_nothrow_invocable_r;
 
  // const-volatile modifications
  template<class T> struct remove_const;
  template<class T> struct remove_volatile;
  template<class T> struct remove_cv;
  template<class T> struct add_const;
  template<class T> struct add_volatile;
  template<class T> struct add_cv;
 
  template<class T>
    using remove_const_t    = typename remove_const<T>::type;
  template<class T>
    using remove_volatile_t = typename remove_volatile<T>::type;
  template<class T>
    using remove_cv_t       = typename remove_cv<T>::type;
  template<class T>
    using add_const_t       = typename add_const<T>::type;
  template<class T>
    using add_volatile_t    = typename add_volatile<T>::type;
  template<class T>
    using add_cv_t          = typename add_cv<T>::type;
 
  // reference modifications
  template<class T> struct remove_reference;
  template<class T> struct add_lvalue_reference;
  template<class T> struct add_rvalue_reference;
 
  template<class T>
    using remove_reference_t     = typename remove_reference<T>::type;
  template<class T>
    using add_lvalue_reference_t = typename add_lvalue_reference<T>::type;
  template<class T>
    using add_rvalue_reference_t = typename add_rvalue_reference<T>::type;
 
  // sign modifications
  template<class T> struct make_signed;
  template<class T> struct make_unsigned;
 
  template<class T>
    using make_signed_t   = typename make_signed<T>::type;
  template<class T>
    using make_unsigned_t = typename make_unsigned<T>::type;
 
  // array modifications
  template<class T> struct remove_extent;
  template<class T> struct remove_all_extents;
 
  template<class T>
    using remove_extent_t      = typename remove_extent<T>::type;
  template<class T>
    using remove_all_extents_t = typename remove_all_extents<T>::type;
 
  // pointer modifications
  template<class T> struct remove_pointer;
  template<class T> struct add_pointer;
 
  template<class T>
    using remove_pointer_t = typename remove_pointer<T>::type;
  template<class T>
    using add_pointer_t    = typename add_pointer<T>::type;
 
  // other transformations
  template<class T> struct type_identity;
  template<class T> struct remove_cvref;
  template<class T> struct decay;
  template<bool, class T = void> struct enable_if;
  template<bool, class T, class F> struct conditional;
  template<class... T> struct common_type;
  template<class T, class U, template<class> class TQual, template<class> class UQual>
    struct basic_common_reference { };
  template<class... T> struct common_reference;
  template<class T> struct underlying_type;
  template<class Fn, class... ArgTypes> struct invoke_result;
  template<class T> struct unwrap_reference;
  template<class T> struct unwrap_ref_decay;
 
  template<class T>
    using type_identity_t    = typename type_identity<T>::type;
  template<class T>
    using remove_cvref_t     = typename remove_cvref<T>::type;
  template<class T>
    using decay_t            = typename decay<T>::type;
  template<bool b, class T = void>
    using enable_if_t        = typename enable_if<b, T>::type;
  template<bool b, class T, class F>
    using conditional_t      = typename conditional<b, T, F>::type;
  template<class... T>
    using common_type_t      = typename common_type<T...>::type;
  template<class... T>
    using common_reference_t = typename common_reference<T...>::type;
  template<class T>
    using underlying_type_t  = typename underlying_type<T>::type;
  template<class Fn, class... ArgTypes>
    using invoke_result_t    = typename invoke_result<Fn, ArgTypes...>::type;
  template<class T>
    using unwrap_reference_t = typename unwrap_reference<T>::type;
  template<class T>
    using unwrap_ref_decay_t = typename unwrap_ref_decay<T>::type;
  template<class...>
    using void_t             = void;
 
  // logical operator traits
  template<class... B> struct conjunction;
  template<class... B> struct disjunction;
  template<class B> struct negation;
 
  // primary type categories
  template<class T>
    inline constexpr bool is_void_v = is_void<T>::value;
  template<class T>
    inline constexpr bool is_null_pointer_v = is_null_pointer<T>::value;
  template<class T>
    inline constexpr bool is_integral_v = is_integral<T>::value;
  template<class T>
    inline constexpr bool is_floating_point_v = is_floating_point<T>::value;
  template<class T>
    inline constexpr bool is_array_v = is_array<T>::value;
  template<class T>
    inline constexpr bool is_pointer_v = is_pointer<T>::value;
  template<class T>
    inline constexpr bool is_lvalue_reference_v = is_lvalue_reference<T>::value;
  template<class T>
    inline constexpr bool is_rvalue_reference_v = is_rvalue_reference<T>::value;
  template<class T>
    inline constexpr bool is_member_object_pointer_v = is_member_object_pointer<T>::value;
  template<class T>
    inline constexpr bool is_member_function_pointer_v = is_member_function_pointer<T>::value;
  template<class T>
    inline constexpr bool is_enum_v = is_enum<T>::value;
  template<class T>
    inline constexpr bool is_union_v = is_union<T>::value;
  template<class T>
    inline constexpr bool is_class_v = is_class<T>::value;
  template<class T>
    inline constexpr bool is_function_v = is_function<T>::value;
 
  // composite type categories
  template<class T>
    inline constexpr bool is_reference_v = is_reference<T>::value;
  template<class T>
    inline constexpr bool is_arithmetic_v = is_arithmetic<T>::value;
  template<class T>
    inline constexpr bool is_fundamental_v = is_fundamental<T>::value;
  template<class T>
    inline constexpr bool is_object_v = is_object<T>::value;
  template<class T>
    inline constexpr bool is_scalar_v = is_scalar<T>::value;
  template<class T>
    inline constexpr bool is_compound_v = is_compound<T>::value;
  template<class T>
    inline constexpr bool is_member_pointer_v = is_member_pointer<T>::value;
 
  // type properties
  template<class T>
    inline constexpr bool is_const_v = is_const<T>::value;
  template<class T>
    inline constexpr bool is_volatile_v = is_volatile<T>::value;
  template<class T>
    inline constexpr bool is_trivial_v = is_trivial<T>::value;
  template<class T>
    inline constexpr bool is_trivially_copyable_v = is_trivially_copyable<T>::value;
  template<class T>
    inline constexpr bool is_standard_layout_v = is_standard_layout<T>::value;
  template<class T>
    inline constexpr bool is_empty_v = is_empty<T>::value;
  template<class T>
    inline constexpr bool is_polymorphic_v = is_polymorphic<T>::value;
  template<class T>
    inline constexpr bool is_abstract_v = is_abstract<T>::value;
  template<class T>
    inline constexpr bool is_final_v = is_final<T>::value;
  template<class T>
    inline constexpr bool is_aggregate_v = is_aggregate<T>::value;
  template<class T>
    inline constexpr bool is_signed_v = is_signed<T>::value;
  template<class T>
    inline constexpr bool is_unsigned_v = is_unsigned<T>::value;
  template<class T>
    inline constexpr bool is_bounded_array_v = is_bounded_array<T>::value;
  template<class T>
    inline constexpr bool is_unbounded_array_v = is_unbounded_array<T>::value;
  template<class T>
    inline constexpr bool is_scoped_enum_v = is_scoped_enum<T>::value;
  template<class T, class... Args>
    inline constexpr bool is_constructible_v = is_constructible<T, Args...>::value;
  template<class T>
    inline constexpr bool is_default_constructible_v = is_default_constructible<T>::value;
  template<class T>
    inline constexpr bool is_copy_constructible_v = is_copy_constructible<T>::value;
  template<class T>
    inline constexpr bool is_move_constructible_v = is_move_constructible<T>::value;
  template<class T, class U>
    inline constexpr bool is_assignable_v = is_assignable<T, U>::value;
  template<class T>
    inline constexpr bool is_copy_assignable_v = is_copy_assignable<T>::value;
  template<class T>
    inline constexpr bool is_move_assignable_v = is_move_assignable<T>::value;
  template<class T, class U>
    inline constexpr bool is_swappable_with_v = is_swappable_with<T, U>::value;
  template<class T>
    inline constexpr bool is_swappable_v = is_swappable<T>::value;
  template<class T>
    inline constexpr bool is_destructible_v = is_destructible<T>::value;
  template<class T, class... Args>
    inline constexpr bool is_trivially_constructible_v
      = is_trivially_constructible<T, Args...>::value;
  template<class T>
    inline constexpr bool is_trivially_default_constructible_v
      = is_trivially_default_constructible<T>::value;
  template<class T>
    inline constexpr bool is_trivially_copy_constructible_v
      = is_trivially_copy_constructible<T>::value;
  template<class T>
    inline constexpr bool is_trivially_move_constructible_v
      = is_trivially_move_constructible<T>::value;
  template<class T, class U>
    inline constexpr bool is_trivially_assignable_v = is_trivially_assignable<T, U>::value;
  template<class T>
    inline constexpr bool is_trivially_copy_assignable_v
      = is_trivially_copy_assignable<T>::value;
  template<class T>
    inline constexpr bool is_trivially_move_assignable_v
      = is_trivially_move_assignable<T>::value;
  template<class T>
    inline constexpr bool is_trivially_destructible_v = is_trivially_destructible<T>::value;
  template<class T, class... Args>
    inline constexpr bool is_nothrow_constructible_v
      = is_nothrow_constructible<T, Args...>::value;
  template<class T>
    inline constexpr bool is_nothrow_default_constructible_v
      = is_nothrow_default_constructible<T>::value;
  template<class T>
    inline constexpr bool is_nothrow_copy_constructible_v
      = is_nothrow_copy_constructible<T>::value;
  template<class T>
    inline constexpr bool is_nothrow_move_constructible_v
      = is_nothrow_move_constructible<T>::value;
  template<class T, class U>
    inline constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<T, U>::value;
  template<class T>
    inline constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<T>::value;
  template<class T>
    inline constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable<T>::value;
  template<class T, class U>
    inline constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<T, U>::value;
  template<class T>
    inline constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<T>::value;
  template<class T>
    inline constexpr bool is_nothrow_destructible_v = is_nothrow_destructible<T>::value;
  template<class T>
    inline constexpr bool has_virtual_destructor_v = has_virtual_destructor<T>::value;
  template<class T>
    inline constexpr bool has_unique_object_representations_v
      = has_unique_object_representations<T>::value;
  template<class T, class U>
    inline constexpr bool reference_constructs_from_temporary_v
      = reference_constructs_from_temporary<T, U>::value;
  template<class T, class U>
    inline constexpr bool reference_converts_from_temporary_v
      = reference_converts_from_temporary<T, U>::value;
 
  // type property queries
  template<class T>
    inline constexpr size_t alignment_of_v = alignment_of<T>::value;
  template<class T>
    inline constexpr size_t rank_v = rank<T>::value;
  template<class T, unsigned I = 0>
    inline constexpr size_t extent_v = extent<T, I>::value;
 
  // type relations
  template<class T, class U>
    inline constexpr bool is_same_v = is_same<T, U>::value;
  template<class Base, class Derived>
    inline constexpr bool is_base_of_v = is_base_of<Base, Derived>::value;
  template<class Base, class Derived>
    inline constexpr bool is_virtual_base_of_v = is_virtual_base_of<Base, Derived>::value;
  template<class From, class To>
    inline constexpr bool is_convertible_v = is_convertible<From, To>::value;
  template<class From, class To>
    inline constexpr bool is_nothrow_convertible_v = is_nothrow_convertible<From, To>::value;
  template<class T, class U>
    inline constexpr bool is_layout_compatible_v = is_layout_compatible<T, U>::value;
  template<class Base, class Derived>
    inline constexpr bool is_pointer_interconvertible_base_of_v
      = is_pointer_interconvertible_base_of<Base, Derived>::value;
  template<class Fn, class... ArgTypes>
    inline constexpr bool is_invocable_v = is_invocable<Fn, ArgTypes...>::value;
  template<class R, class Fn, class... ArgTypes>
    inline constexpr bool is_invocable_r_v = is_invocable_r<R, Fn, ArgTypes...>::value;
  template<class Fn, class... ArgTypes>
    inline constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<Fn, ArgTypes...>::value;
  template<class R, class Fn, class... ArgTypes>
    inline constexpr bool is_nothrow_invocable_r_v
      = is_nothrow_invocable_r<R, Fn, ArgTypes...>::value;
 
  // logical operator traits
  template<class... B>
    inline constexpr bool conjunction_v = conjunction<B...>::value;
  template<class... B>
    inline constexpr bool disjunction_v = disjunction<B...>::value;
  template<class B>
    inline constexpr bool negation_v = negation<B>::value;
 
  // member relationships
  template<class S, class M>
    constexpr bool is_pointer_interconvertible_with_class(M S::*m) noexcept;
  template<class S1, class S2, class M1, class M2>
    constexpr bool is_corresponding_member(M1 S1::*m1, M2 S2::*m2) noexcept;
 
  // constant evaluation context
  constexpr bool is_constant_evaluated() noexcept;
  consteval bool is_within_lifetime(const auto*) noexcept;
}

[编辑] 类模板 std::integral_constant

namespace std {
  template <class T, T v>
  struct integral_constant {
    static constexpr T value = v;
    using value_type = T;
    using type = integral_constant<T, v>;
    constexpr operator value_type() const noexcept { return value; }
    constexpr value_type operator()() const noexcept { return value; }
  };
}