template< class From, class To > struct is_nothrow_convertible; (2) (C++20 起) 1) 如果虚构的函数定义 To test() { return std::declval<From>(); } 良构,(即 std::declval<From>() 能用隐式转换转换为 To,或 From 和To 均为可有 cv 限定的 void),那么提供的成员常量 value 等于true。否则...
is_virtual_base_of (C++26) is_convertibleis_nothrow_convertible (C++11)(C++20) is_layout_compatible (C++20) is_pointer_interconvertible_base_of (C++20) is_pointer_interconvertible_with_class (C++20) is_corresponding_member (C++20) alignment_of (C++11) rank (C++11) extent (C++11) is_...
std::is_convertible_v<conststd::optional<U>&, T> std::is_convertible_v<std::optional<U>&&, T> std::is_convertible_v<conststd::optional<U>&&, T> This overload is declared as if withexplicit(!std::is_convertible_v<constU&, T>). ...
ConvertibleTo 指定类型能隐式转换成另一类型 (概念) CommonReference 指定两个类型共有一个公共引用类型 (概念) Common 指定两个类型共有一个公共类型 (概念) Integral 指定类型为整型类型 (概念) SignedIntegral 指定类型为有符号的整型类型 (概念) UnsignedIntegral ...
std::basic_string_view<CharT, Traits>>istrueandstd::is_convertible_v<constStringViewLike&,constCharT*>isfalse. In all cases, equality is checked by callingTraits::eq. Parameters str-string to search for pos-position at which to begin searching ...
4) 如同以直接非列表初始化,用表达式 std::forward<U>(u) 初始化 this->t_。此构造函数仅当 std::is_constructible<T, U>::value 为true 而std::decay_t<U> 不是propagate_const 的特化时才参与重载决议。此构造函数当且仅当 std::is_convertible<U, T>::value 为false 才为explicit。
Derivedis an incomplete union typethe base characteristic is std::false_typein this case See also is_virtual_base_of (C++26) checks if a type is a virtual base of the other type (class template) is_convertibleis_nothrow_convertible
std::is_convertible_v<From, To>&& requires{ static_cast<To>(std::declval<From>()); }; (since C++20) The conceptconvertible_to<From, To>specifies that an expression of the same type and value category as those ofstd::declval<From>()can be implicitly and explicitly converted to the ty...
__cpp_lib_is_nothrow_convertible std::is_convertible 201806L (C++20) P0758R1LWG3356 __cpp_lib_is_null_pointer std::is_null_pointer 201309L (C++14)(DR11) LWG2247 __cpp_lib_is_pointer_interconvertible 指针可互转换特征:std::is_pointer_interconvertible_with_class 和std::is_pointer_in...
is_virtual_base_of (C++26) is_convertibleis_nothrow_convertible (C++11)(C++20) is_layout_compatible (C++20) is_pointer_interconvertible_base_of (C++20) is_pointer_interconvertible_with_class (C++20) is_corresponding_member (C++20) alignment_of (C++11) rank (C++11) extent (C++11) is_...