get(std::pair) (C++11) accesses an element of apair (function template) Helper classes std::tuple_size<std::pair> (C++11) obtains the size of apair (class template specialization) std::tuple_element<std::pair> (
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 (公开静态成员常量) 成...
struct tuple_element<I, std::pair<T1, T2>>; (since C++11) The partial specializations of std::tuple_element for pairs provide compile-time access to the types of the pair's elements, using tuple-like syntax. The program is ill-formed if I >= 2. Member...
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 ...
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 function overloads using the two types as parameter types...
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, ...
for (std::vector<LogItem>::const_iterator itr = logsResponse.result.logdatas.begin(); itr != logsResponse.result.logdatas.end(); ++itr) { const LogItem &item = *itr; for (std::vector<std::pair<std::string, std::string>>::const_iterator itr_data = item.data.begin(); itr_data...
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 ...
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 ...