std::tuple_element<std::pair> (C++11) obtains the type of the elements ofpair (class template specialization) std::basic_common_reference<std::pair> (C++23) determines the common reference type of twopairs (clas
get(std::pair<T1, T2>&p)noexcept; (1)(since C++11) (constexpr since C++14) template<std::size_tI,classT1,classT2> consttypenamestd::tuple_element<I,std::pair<T1,T2>>::type& get(conststd::pair<T1,T2>&p)noexcept; (2)(since C++11) ...
struct tuple_size<std::pair<T1, T2>> : std::integral_constant<std::size_t, 2> { }; (C++11 起) std::tuple_size 对对偶的部分特化提供在编译时使用元组式语法获得对偶中元素个数的方法,该数总是 2。 继承自 std::integral_constant 成员常量 value [静态] 常数值 2 (公开静态成员常量) 成...
tuple_size<std::pair> (C++11) tuple_element<std::pair> (C++11) basic_common_reference<std::pair> (C++23) common_type<std::pair> (C++23) formatter<std::pair> (C++23) piecewise_construct_t (C++11) Deduction guides(C++17) (1) void swap( pair& other ) noexcept(/* see below */...
pair−tuple(C++11) optional(C++17) expected(C++23) variant(C++17)−any(C++17) bitset−Bit manipulation(C++20) Containers library vector−deque−array(C++11) list−forward_list(C++11) inplace_vector(C++26) hive(C++26) map−multimap−set−multiset ...
pair−tuple(C++11) optional(C++17) expected(C++23) variant(C++17)−any(C++17) bitset−Bit manipulation(C++20) Containers library vector−deque−array(C++11) list−forward_list(C++11) inplace_vector(C++26) hive(C++26) map−multimap−set−multiset ...
specializes thestd::swapalgorithm (function template) erase_if(std::set) (C++20) erases all elements satisfying specific criteria (function template) Deduction guides (since C++17) Notes The member typesiteratorandconst_iteratormay be aliases to the same type. This means defining a pair of functi...
Function objects − hash (C++11) Swap − Type operations (C++11) Integer comparison (C++20) pair − tuple (C++11) optional (C++17) expected (C++23) variant (C++17) − any (C++17) bitset − Bit manipulation (C++20) Containers library vector − deque − array (C++11) list ...
>array 可以当作部分 pair 和 tuple 的替用品,或者替代原生数组 # 一些其他容器 >bitset >basic_string 另外,可以参阅C 的字符串函数 # IO >cpp 风格 IO 可以了解 stringstream 类,以及 输入/输出操纵符 >C 风格 IO +fopen +freopen +sscanf +sprintf ...
std::tuple From cppreference.com Defined in header<tuple> template<class...Types> classtuple; (since C++11) Class templatestd::tupleis a fixed-size collection of heterogeneous values. It is a generalization ofstd::pair. Ifstd::is_trivially_destructible<Ti>::valueistruefor everyTiinTypes, ...