libstdc++
Utilities
Collaboration diagram for Utilities:

Topics

 Function Objects
 
 Memory
 
 Metaprogramming
 
 Rational Arithmetic
 
 Time
 

Classes

class  std::bitset< _Nb >
 
struct  std::pair< _T1, _T2 >
 
struct  std::piecewise_construct_t
 
class  std::tuple< _Elements >
 
class  std::tuple< _T1, _T2 >
 
struct  std::tuple_element< __i, tuple< _Types... > >
 
struct  std::tuple_size< tuple< _Elements... > >
 
struct  std::type_index
 
struct  std::uses_allocator< tuple< _Types... >, _Alloc >
 

Functions

template<typename... _Args1, typename... _Args2>
constexpr std::pair< _T1, _T2 >::pair (piecewise_construct_t, tuple< _Args1... >, tuple< _Args2... >)
 
template<typename _Tp >
constexpr _Tp * std::__addressof (_Tp &__r) noexcept
 
template<typename _Tp , typename _Up = _Tp>
constexpr _Tp std::__exchange (_Tp &__obj, _Up &&__new_val)
 
template<size_t __i, typename _Head , typename... _Tail>
constexpr _Head & std::__get_helper (_Tuple_impl< __i, _Head, _Tail... > &__t) noexcept
 
template<size_t __i, typename _Head , typename... _Tail>
constexpr const _Head & std::__get_helper (const _Tuple_impl< __i, _Head, _Tail... > &__t) noexcept
 
template<size_t __i, typename... _Types>
__enable_if_t<(__i >=sizeof...(_Types))> std::__get_helper (const tuple< _Types... > &)=delete
 
template<typename _Tp , typename _Up = typename __inv_unwrap<_Tp>::type>
constexpr _Up && std::__invfwd (typename remove_reference< _Tp >::type &__t) noexcept
 
template<typename _Callable , typename... _Args>
constexpr __invoke_result< _Callable, _Args... >::type std::__invoke (_Callable &&__fn, _Args &&... __args) noexcept(__is_nothrow_invocable< _Callable, _Args... >::value)
 
template<typename _Res , typename _MemFun , typename _Tp , typename... _Args>
constexpr _Res std::__invoke_impl (__invoke_memfun_deref, _MemFun &&__f, _Tp &&__t, _Args &&... __args)
 
template<typename _Res , typename _MemFun , typename _Tp , typename... _Args>
constexpr _Res std::__invoke_impl (__invoke_memfun_ref, _MemFun &&__f, _Tp &&__t, _Args &&... __args)
 
template<typename _Res , typename _MemPtr , typename _Tp >
constexpr _Res std::__invoke_impl (__invoke_memobj_deref, _MemPtr &&__f, _Tp &&__t)
 
template<typename _Res , typename _MemPtr , typename _Tp >
constexpr _Res std::__invoke_impl (__invoke_memobj_ref, _MemPtr &&__f, _Tp &&__t)
 
template<typename _Res , typename _Fn , typename... _Args>
constexpr _Res std::__invoke_impl (__invoke_other, _Fn &&__f, _Args &&... __args)
 
template<typename _Res , typename _Callable , typename... _Args>
constexpr enable_if_t< is_invocable_r_v< _Res, _Callable, _Args... >, _Res > std::__invoke_r (_Callable &&__fn, _Args &&... __args) noexcept(is_nothrow_invocable_r_v< _Res, _Callable, _Args... >)
 
template<typename _Cat , typename _Tp , typename _Up >
constexpr _Cat std::__tuple_cmp (const _Tp &, const _Up &, index_sequence<>)
 
template<typename _Cat , typename _Tp , typename _Up , size_t _Idx0, size_t... _Idxs>
constexpr _Cat std::__tuple_cmp (const _Tp &__t, const _Up &__u, index_sequence< _Idx0, _Idxs... >)
 
template<typename _Tp >
constexpr _Tp * std::addressof (_Tp &__r) noexcept
 
template<typename _Tp >
const _Tp * std::addressof (const _Tp &&)=delete
 
template<typename _Tp >
auto std::declval () noexcept -> decltype(__declval< _Tp >(0))
 
template<typename _Tp >
constexpr _Tp && std::forward (typename std::remove_reference< _Tp >::type &&__t) noexcept
 
template<typename _Tp >
constexpr _Tp && std::forward (typename std::remove_reference< _Tp >::type &__t) noexcept
 
template<typename... _Elements>
constexpr tuple< _Elements &&... > std::forward_as_tuple (_Elements &&... __args) noexcept
 
template<size_t __i, typename... _Elements>
constexpr const __tuple_element_t< __i, tuple< _Elements... > > && std::get (const tuple< _Elements... > &&__t) noexcept
 
template<size_t __i, typename... _Elements>
constexpr const __tuple_element_t< __i, tuple< _Elements... > > & std::get (const tuple< _Elements... > &__t) noexcept
 
template<size_t __i, typename... _Elements>
constexpr __tuple_element_t< __i, tuple< _Elements... > > && std::get (tuple< _Elements... > &&__t) noexcept
 
template<size_t __i, typename... _Elements>
constexpr __tuple_element_t< __i, tuple< _Elements... > > & std::get (tuple< _Elements... > &__t) noexcept
 
template<typename _T1 , typename _T2 >
constexpr pair< typename __decay_and_strip< _T1 >::__type, typename __decay_and_strip< _T2 >::__type > std::make_pair (_T1 &&__x, _T2 &&__y)
 
template<typename... _Elements>
constexpr tuple< typename __decay_and_strip< _Elements >::__type... > std::make_tuple (_Elements &&... __args)
 
template<typename _Tp >
constexpr std::remove_reference< _Tp >::type && std::move (_Tp &&__t) noexcept
 
template<typename _Tp >
constexpr __conditional_t< __move_if_noexcept_cond< _Tp >::value, const _Tp &, _Tp && > std::move_if_noexcept (_Tp &__x) noexcept
 
template<typename... _Tps, typename... _Ups>
constexpr common_comparison_category_t< __detail::__synth3way_t< _Tps, _Ups >... > std::operator<=> (const tuple< _Tps... > &__t, const tuple< _Ups... > &__u)
 
template<typename... _TElements, typename... _UElements>
constexpr bool std::operator== (const tuple< _TElements... > &__t, const tuple< _UElements... > &__u)
 
template<typename _Tp >
constexpr enable_if< __and_< __not_< __is_tuple_like< _Tp > >, is_move_constructible< _Tp >, is_move_assignable< _Tp > >::value >::type std::swap (_Tp &__a, _Tp &__b) noexcept(/*conditional */) is_nothrow_move_assignable< _Tp > >
 
template<typename _Tp , size_t _Nm>
constexpr enable_if< __is_swappable< _Tp >::value >::type std::swap (_Tp(&__a)[_Nm], _Tp(&__b)[_Nm]) noexcept(/*conditional */)
 
template<typename... _Elements>
constexpr enable_if< __and_< __is_swappable< _Elements >... >::value >::type std::swap (tuple< _Elements... > &__x, tuple< _Elements... > &__y) noexcept(noexcept(__x.swap(__y)))
 
template<typename... _Elements>
constexpr tuple< _Elements &... > std::tie (_Elements &... __args) noexcept
 
template<typename... _UTypes>
 std::tuple (_UTypes...) -> tuple< _UTypes... >
 
template<typename _Alloc , typename... _UTypes>
 std::tuple (allocator_arg_t, _Alloc, _UTypes...) -> tuple< _UTypes... >
 
template<typename _Alloc , typename _T1 , typename _T2 >
 std::tuple (allocator_arg_t, _Alloc, pair< _T1, _T2 >) -> tuple< _T1, _T2 >
 
template<typename _Alloc , typename... _UTypes>
 std::tuple (allocator_arg_t, _Alloc, tuple< _UTypes... >) -> tuple< _UTypes... >
 
template<typename _T1 , typename _T2 >
 std::tuple (pair< _T1, _T2 >) -> tuple< _T1, _T2 >
 
template<typename... _Tpls, typename = typename enable_if<__and_<__is_tuple_like<_Tpls>...>::value>::type>
constexpr auto std::tuple_cat (_Tpls &&... __tpls) -> typename __tuple_cat_result< _Tpls... >::__type
 

Variables

constexpr _Swallow_assign std::ignore
 
constexpr piecewise_construct_t std::piecewise_construct
 
template<typename... _Types>
constexpr size_t std::tuple_size_v< const tuple< _Types... > >
 
template<typename... _Types>
constexpr size_t std::tuple_size_v< tuple< _Types... > >
 
template<typename _T1 , typename _T2 >
 pair (_T1, _T2) -> pair< _T1, _T2 >
 
template<typename _T1 , typename _T2 >
constexpr bool operator== (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
 
template<typename _T1 , typename _T2 >
constexpr bool operator< (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
 
template<typename _T1 , typename _T2 >
constexpr bool operator!= (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
 
template<typename _T1 , typename _T2 >
constexpr bool operator> (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
 
template<typename _T1 , typename _T2 >
constexpr bool operator<= (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
 
template<typename _T1 , typename _T2 >
constexpr bool operator>= (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
 
template<typename _T1 , typename _T2 >
constexpr enable_if< __and_< __is_swappable< _T1 >, __is_swappable< _T2 > >::value >::type swap (pair< _T1, _T2 > &__x, pair< _T1, _T2 > &__y) noexcept(noexcept(__x.swap(__y)))
 

Detailed Description

Basic function and class templates used with the rest of the library. Includes pair, swap, forward/move helpers, declval, integer_sequence.

Function Documentation

◆ pair() [1/2]

template<typename _T1 , typename _T2 >
pair ( _T1 ,
_T2  ) -> pair< _T1, _T2 >
related

Two pairs of the same type are equal iff their members are equal.

References std::pair< _T1, _T2 >::first, and std::pair< _T1, _T2 >::second.

◆ pair() [2/2]

template<class _T1 , class _T2 >
template<typename... _Args1, typename... _Args2>
std::pair< _T1, _T2 >::pair ( piecewise_construct_t ,
tuple< _Args1... > __first,
tuple< _Args2... > __second )
inlineconstexpr

"piecewise construction" using a tuple of arguments for each member.

Parameters
__firstArguments for the first member of the pair.
__secondArguments for the second member of the pair.

The elements of each tuple will be used as the constructor arguments for the data members of the pair.

Definition at line 2876 of file tuple.

◆ __addressof()

◆ __exchange()

template<typename _Tp , typename _Up = _Tp>
_Tp std::__exchange ( _Tp & __obj,
_Up && __new_val )
inlineconstexpr

Definition at line 187 of file move.h.

◆ __get_helper() [1/2]

template<size_t __i, typename _Head , typename... _Tail>
_Head & std::__get_helper ( _Tuple_impl< __i, _Head, _Tail... > & __t)
constexprnoexcept

Definition at line 2431 of file tuple.

◆ __get_helper() [2/2]

template<size_t __i, typename _Head , typename... _Tail>
const _Head & std::__get_helper ( const _Tuple_impl< __i, _Head, _Tail... > & __t)
constexprnoexcept

Definition at line 2436 of file tuple.

◆ __invfwd()

template<typename _Tp , typename _Up = typename __inv_unwrap<_Tp>::type>
_Up && std::__invfwd ( typename remove_reference< _Tp >::type & __t)
constexprnoexcept

Definition at line 55 of file invoke.h.

◆ __invoke()

template<typename _Callable , typename... _Args>
__invoke_result< _Callable, _Args... >::type std::__invoke ( _Callable && __fn,
_Args &&... __args )
constexprnoexcept

Invoke a callable object.

Definition at line 90 of file invoke.h.

References std::forward().

◆ __invoke_impl() [1/5]

template<typename _Res , typename _MemFun , typename _Tp , typename... _Args>
_Res std::__invoke_impl ( __invoke_memfun_deref ,
_MemFun && __f,
_Tp && __t,
_Args &&... __args )
constexpr

Definition at line 71 of file invoke.h.

◆ __invoke_impl() [2/5]

template<typename _Res , typename _MemFun , typename _Tp , typename... _Args>
_Res std::__invoke_impl ( __invoke_memfun_ref ,
_MemFun && __f,
_Tp && __t,
_Args &&... __args )
constexpr

Definition at line 65 of file invoke.h.

◆ __invoke_impl() [3/5]

template<typename _Res , typename _MemPtr , typename _Tp >
_Res std::__invoke_impl ( __invoke_memobj_deref ,
_MemPtr && __f,
_Tp && __t )
constexpr

Definition at line 84 of file invoke.h.

◆ __invoke_impl() [4/5]

template<typename _Res , typename _MemPtr , typename _Tp >
_Res std::__invoke_impl ( __invoke_memobj_ref ,
_MemPtr && __f,
_Tp && __t )
constexpr

Definition at line 79 of file invoke.h.

◆ __invoke_impl() [5/5]

template<typename _Res , typename _Fn , typename... _Args>
_Res std::__invoke_impl ( __invoke_other ,
_Fn && __f,
_Args &&... __args )
constexpr

Definition at line 60 of file invoke.h.

◆ __invoke_r()

template<typename _Res , typename _Callable , typename... _Args>
enable_if_t< is_invocable_r_v< _Res, _Callable, _Args... >, _Res > std::__invoke_r ( _Callable && __fn,
_Args &&... __args )
constexprnoexcept

Definition at line 104 of file invoke.h.

◆ __tuple_cmp() [1/2]

template<typename _Cat , typename _Tp , typename _Up >
_Cat std::__tuple_cmp ( const _Tp & ,
const _Up & ,
index_sequence<>  )
constexpr

Definition at line 2574 of file tuple.

◆ __tuple_cmp() [2/2]

template<typename _Cat , typename _Tp , typename _Up , size_t _Idx0, size_t... _Idxs>
_Cat std::__tuple_cmp ( const _Tp & __t,
const _Up & __u,
index_sequence< _Idx0, _Idxs... >  )
constexpr

Definition at line 2580 of file tuple.

◆ addressof()

template<typename _Tp >
_Tp * std::addressof ( _Tp & __r)
inlinenodiscardconstexprnoexcept

Returns the actual address of the object or function referenced by r, even in the presence of an overloaded operator&.

Parameters
__rReference to an object or function.
Returns
The actual address.
Since
C++11

Definition at line 175 of file move.h.

References std::__addressof().

◆ declval()

template<typename _Tp >
auto std::declval ( ) -> decltype(__declval< _Tp >(0))
noexcept

Utility to simplify expressions used in unevaluated operands

Since
C++11

Definition at line 2483 of file type_traits.

◆ forward() [1/2]

template<typename _Tp >
_Tp && std::forward ( typename std::remove_reference< _Tp >::type && __t)
nodiscardconstexprnoexcept

Forward an rvalue.

Returns
The parameter cast to the specified type.

This function is used to implement "perfect forwarding".

Since
C++11

Definition at line 84 of file move.h.

◆ forward() [2/2]

template<typename _Tp >
_Tp && std::forward ( typename std::remove_reference< _Tp >::type & __t)
nodiscardconstexprnoexcept

Forward an lvalue.

Returns
The parameter cast to the specified type.

This function is used to implement "perfect forwarding".

Since
C++11

Definition at line 71 of file move.h.

Referenced by std::function< _Res(_ArgTypes...)>::function(), std::move_only_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>::move_only_function(), std::move_only_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>::move_only_function(), std::move_only_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>::move_only_function(), std::__invoke(), std::_Construct(), std::list< _Tp, _Alloc >::_M_create_node(), std::deque< _Tp, _Alloc >::_M_push_back_aux(), std::deque< _Tp, _Alloc >::_M_push_front_aux(), std::shared_ptr< _Tp >::allocate_shared(), std::allocator_traits< typename >::construct(), std::allocator_traits< allocator< _Tp > >::construct(), std::allocator_traits< allocator< void > >::construct(), std::allocator_traits< pmr::polymorphic_allocator< _Tp > >::construct(), std::deque< _Tp, _Alloc >::emplace(), std::list< _Tp, _Alloc >::emplace(), std::map< _Key, _Tp, _Compare, _Alloc >::emplace(), std::multimap< _Key, _Tp, _Compare, _Alloc >::emplace(), std::multiset< _Key, _Compare, _Alloc >::emplace(), std::set< _Key, _Compare, _Alloc >::emplace(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::emplace(), std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >::emplace(), std::unordered_multiset< _Value, _Hash, _Pred, _Alloc >::emplace(), std::unordered_set< _Value, _Hash, _Pred, _Alloc >::emplace(), std::vector< _Tp, _Alloc >::emplace(), std::forward_list< _Tp, _Alloc >::emplace_after(), std::forward_list< _Tp, _Alloc >::emplace_front(), std::map< _Key, _Tp, _Compare, _Alloc >::emplace_hint(), std::multimap< _Key, _Tp, _Compare, _Alloc >::emplace_hint(), std::multiset< _Key, _Compare, _Alloc >::emplace_hint(), std::set< _Key, _Compare, _Alloc >::emplace_hint(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::emplace_hint(), std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >::emplace_hint(), std::unordered_multiset< _Value, _Hash, _Pred, _Alloc >::emplace_hint(), std::unordered_set< _Value, _Hash, _Pred, _Alloc >::emplace_hint(), std::map< _Key, _Tp, _Compare, _Alloc >::insert(), std::map< _Key, _Tp, _Compare, _Alloc >::insert(), std::multimap< _Key, _Tp, _Compare, _Alloc >::insert(), std::multimap< _Key, _Tp, _Compare, _Alloc >::insert(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::map< _Key, _Tp, _Compare, _Alloc >::insert_or_assign(), std::map< _Key, _Tp, _Compare, _Alloc >::insert_or_assign(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert_or_assign(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert_or_assign(), std::make_pair(), std::shared_ptr< _Tp >::make_shared(), std::unique_ptr< _Tp, _Dp >::make_unique(), std::function< _Res(_ArgTypes...)>::operator()(), std::move_only_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>::operator()(), std::function< _Res(_ArgTypes...)>::operator=(), std::move_only_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>::operator=(), std::unique_ptr< _Tp, _Dp >::operator=(), std::unique_ptr< _Tp[], _Dp >::operator=(), std::sample(), std::throw_with_nested(), std::map< _Key, _Tp, _Compare, _Alloc >::try_emplace(), std::map< _Key, _Tp, _Compare, _Alloc >::try_emplace(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::try_emplace(), and std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::try_emplace().

◆ forward_as_tuple()

template<typename... _Elements>
tuple< _Elements &&... > std::forward_as_tuple ( _Elements &&... __args)
constexprnoexcept

◆ get() [1/4]

template<size_t __i, typename... _Elements>
const __tuple_element_t< __i, tuple< _Elements... > > && std::get ( const tuple< _Elements... > && __t)
constexprnoexcept

Return a const rvalue reference to the ith element of a const tuple rvalue.

Definition at line 2468 of file tuple.

◆ get() [2/4]

template<size_t __i, typename... _Elements>
const __tuple_element_t< __i, tuple< _Elements... > > & std::get ( const tuple< _Elements... > & __t)
constexprnoexcept

Return a const reference to the ith element of a const tuple.

Definition at line 2453 of file tuple.

◆ get() [3/4]

template<size_t __i, typename... _Elements>
__tuple_element_t< __i, tuple< _Elements... > > && std::get ( tuple< _Elements... > && __t)
constexprnoexcept

Return an rvalue reference to the ith element of a tuple rvalue.

Definition at line 2459 of file tuple.

◆ get() [4/4]

template<size_t __i, typename... _Elements>
__tuple_element_t< __i, tuple< _Elements... > > & std::get ( tuple< _Elements... > & __t)
constexprnoexcept

Return a reference to the ith element of a tuple.

Definition at line 2447 of file tuple.

◆ make_pair()

template<typename _T1 , typename _T2 >
pair< typename __decay_and_strip< _T1 >::__type, typename __decay_and_strip< _T2 >::__type > std::make_pair ( _T1 && __x,
_T2 && __y )
constexpr

A convenience wrapper for creating a pair from two objects.

Parameters
__xThe first object.
__yThe second object.
Returns
A newly-constructed pair<> object of the appropriate type.

The C++98 standard says the objects are passed by reference-to-const, but C++03 says they are passed by value (this was LWG issue #181).

Since C++11 they have been passed by forwarding reference and then forwarded to the new members of the pair. To create a pair with a member of reference type, pass a reference_wrapper to this function.

Definition at line 1132 of file stl_pair.h.

References std::forward().

Referenced by __gnu_parallel::__find_template(), std::__gen_two_uniform_ints(), __gnu_debug::__get_distance(), __gnu_parallel::__parallel_merge_advance(), __gnu_parallel::__parallel_sort_qsb(), __gnu_parallel::__qsb_local_sort_with_helping(), __gnu_parallel::__adjacent_find_selector::_M_sequential_algorithm(), __gnu_parallel::__find_first_of_selector< _FIterator >::_M_sequential_algorithm(), __gnu_parallel::__find_if_selector::_M_sequential_algorithm(), __gnu_parallel::multiseq_partition(), __gnu_parallel::multiseq_selection(), __gnu_parallel::parallel_multiway_merge(), __gnu_parallel::parallel_sort_mwms_pu(), and __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::valid_prefix().

◆ make_tuple()

template<typename... _Elements>
tuple< typename __decay_and_strip< _Elements >::__type... > std::make_tuple ( _Elements &&... __args)
constexpr

Create a tuple containing copies of the arguments.

Definition at line 2642 of file tuple.

◆ move()

template<typename _Tp >
std::remove_reference< _Tp >::type && std::move ( _Tp && __t)
nodiscardconstexprnoexcept

Convert a value to an rvalue.

Parameters
__tA thing of arbitrary type.
Returns
The parameter cast to an rvalue-reference to allow moving it.
Since
C++11

Definition at line 137 of file move.h.

Referenced by std::unique_ptr< _Tp, _Dp >::~unique_ptr(), std::basic_regex< _Ch_type, _Rx_traits >::assign(), std::basic_string< _CharT, _Traits, _Alloc >::assign(), std::atomic_compare_exchange_strong(), std::atomic_compare_exchange_strong(), std::atomic_compare_exchange_strong_explicit(), std::atomic_compare_exchange_strong_explicit(), std::atomic_compare_exchange_weak(), std::atomic_compare_exchange_weak(), std::atomic_compare_exchange_weak_explicit(), std::atomic_compare_exchange_weak_explicit(), std::atomic_exchange(), std::atomic_exchange(), std::atomic_store(), std::atomic_store(), std::shared_ptr< _Tp >::const_pointer_cast(), std::shared_ptr< _Tp >::dynamic_pointer_cast(), std::for_each_n(), std::get(), std::get(), std::get(), std::get(), std::get(), std::get(), std::deque< _Tp, _Alloc >::insert(), std::list< _Tp, _Alloc >::insert(), std::map< _Key, _Tp, _Compare, _Alloc >::insert(), std::map< _Key, _Tp, _Compare, _Alloc >::insert(), std::map< _Key, _Tp, _Compare, _Alloc >::insert(), std::map< _Key, _Tp, _Compare, _Alloc >::insert(), std::multimap< _Key, _Tp, _Compare, _Alloc >::insert(), std::multimap< _Key, _Tp, _Compare, _Alloc >::insert(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::unordered_multiset< _Value, _Hash, _Pred, _Alloc >::insert(), std::unordered_multiset< _Value, _Hash, _Pred, _Alloc >::insert(), std::unordered_multiset< _Value, _Hash, _Pred, _Alloc >::insert(), std::unordered_multiset< _Value, _Hash, _Pred, _Alloc >::insert(), std::unordered_set< _Value, _Hash, _Pred, _Alloc >::insert(), std::unordered_set< _Value, _Hash, _Pred, _Alloc >::insert(), std::unordered_set< _Value, _Hash, _Pred, _Alloc >::insert(), std::unordered_set< _Value, _Hash, _Pred, _Alloc >::insert(), std::vector< _Tp, _Alloc >::insert(), std::vector< _Tp, _Alloc >::insert(), std::forward_list< _Tp, _Alloc >::merge(), std::forward_list< _Tp, _Alloc >::merge(), std::move_if_noexcept(), std::chrono::operator<<(), std::deque< _Tp, _Alloc >::operator=(), std::forward_list< _Tp, _Alloc >::operator=(), std::function< _Res(_ArgTypes...)>::operator=(), std::list< _Tp, _Alloc >::operator=(), std::vector< _Tp, _Alloc >::operator=(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::operator[](), std::shared_ptr< _Tp >::reinterpret_pointer_cast(), std::unique_ptr< _Tp, _Dp >::reset(), std::unique_ptr< _Tp[], _Dp >::reset(), std::list< _Tp, _Alloc >::splice(), std::list< _Tp, _Alloc >::splice(), and std::shared_ptr< _Tp >::static_pointer_cast().

◆ move_if_noexcept()

template<typename _Tp >
__conditional_t< __move_if_noexcept_cond< _Tp >::value, const _Tp &, _Tp && > std::move_if_noexcept ( _Tp & __x)
nodiscardconstexprnoexcept

Conditionally convert a value to an rvalue.

Parameters
__xA thing of arbitrary type.
Returns
The parameter, possibly cast to an rvalue-reference.

Same as std::move unless the type's move constructor could throw and the type is copyable, in which case an lvalue-reference is returned instead.

Since
C++11

Definition at line 159 of file move.h.

References std::move().

◆ operator!=()

template<typename _T1 , typename _T2 >
bool operator!= ( const pair< _T1, _T2 > & __x,
const pair< _T1, _T2 > & __y )
related

Uses operator== to find the result.

Definition at line 1052 of file stl_pair.h.

◆ operator<()

template<typename _T1 , typename _T2 >
bool operator< ( const pair< _T1, _T2 > & __x,
const pair< _T1, _T2 > & __y )
related

Defines a lexicographical order for pairs.

For two pairs of the same type, P is ordered before Q if P.first is less than Q.first, or if P.first and Q.first are equivalent (neither is less than the other) and P.second is less than Q.second.

Definition at line 1044 of file stl_pair.h.

References std::pair< _T1, _T2 >::first, and std::pair< _T1, _T2 >::second.

◆ operator<=()

template<typename _T1 , typename _T2 >
bool operator<= ( const pair< _T1, _T2 > & __x,
const pair< _T1, _T2 > & __y )
related

Uses operator< to find the result.

Definition at line 1063 of file stl_pair.h.

◆ operator<=>()

template<typename... _Tps, typename... _Ups>
common_comparison_category_t< __detail::__synth3way_t< _Tps, _Ups >... > std::operator<=> ( const tuple< _Tps... > & __t,
const tuple< _Ups... > & __u )
constexpr

Definition at line 2591 of file tuple.

◆ operator==() [1/2]

template<typename... _TElements, typename... _UElements>
bool std::operator== ( const tuple< _TElements... > & __t,
const tuple< _UElements... > & __u )
constexpr

Definition at line 2560 of file tuple.

◆ operator==() [2/2]

template<typename _T1 , typename _T2 >
bool operator== ( const pair< _T1, _T2 > & __x,
const pair< _T1, _T2 > & __y )
related

Two pairs of the same type are equal iff their members are equal.

Definition at line 1033 of file stl_pair.h.

References std::pair< _T1, _T2 >::first, and std::pair< _T1, _T2 >::second.

◆ operator>()

template<typename _T1 , typename _T2 >
bool operator> ( const pair< _T1, _T2 > & __x,
const pair< _T1, _T2 > & __y )
related

Uses operator< to find the result.

Definition at line 1058 of file stl_pair.h.

◆ operator>=()

template<typename _T1 , typename _T2 >
bool operator>= ( const pair< _T1, _T2 > & __x,
const pair< _T1, _T2 > & __y )
related

Uses operator< to find the result.

Definition at line 1070 of file stl_pair.h.

◆ swap() [1/4]

template<typename _T1 , typename _T2 >
enable_if< __and_< __is_swappable< _T1 >, __is_swappable< _T2 > >::value >::type swap ( pair< _T1, _T2 > & __x,
pair< _T1, _T2 > & __y )
related

Swap overload for pairs. Calls std::pair::swap().

Note
This std::swap overload is not declared in C++03 mode, which has performance implications, e.g. see https://gcc.gnu.org/PR38466

Definition at line 1089 of file stl_pair.h.

References std::pair< _T1, _T2 >::swap().

◆ swap() [2/4]

template<typename _Tp >
enable_if< __and_< __not_< __is_tuple_like< _Tp > >, is_move_constructible< _Tp >, is_move_assignable< _Tp > >::value >::type std::swap ( _Tp & __a,
_Tp & __b )
inlineconstexprnoexcept

Swaps two values.

Parameters
__aA thing of arbitrary type.
__bAnother thing of arbitrary type.
Returns
Nothing.

Definition at line 226 of file move.h.

◆ swap() [3/4]

template<typename _Tp , size_t _Nm>
enable_if< __is_swappable< _Tp >::value >::type std::swap ( _Tp(&) __a[_Nm],
_Tp(&) __b[_Nm] )
inlineconstexprnoexcept

Swap the contents of two arrays.

Definition at line 250 of file move.h.

◆ swap() [4/4]

template<typename... _Elements>
enable_if< __and_< __is_swappable< _Elements >... >::value >::type std::swap ( tuple< _Elements... > & __x,
tuple< _Elements... > & __y )
inlineconstexprdeletenoexcept

Exchange the values of two tuples.

Exchange the values of two const tuples (if const elements can be swapped)

Definition at line 2807 of file tuple.

◆ tie()

template<typename... _Elements>
tuple< _Elements &... > std::tie ( _Elements &... __args)
constexprnoexcept

Return a tuple of lvalue references bound to the arguments.

Definition at line 2793 of file tuple.

Referenced by std::basic_ios< _CharT, _Traits >::copyfmt().

◆ tuple_cat()

template<typename... _Tpls, typename = typename enable_if<__and_<__is_tuple_like<_Tpls>...>::value>::type>
auto std::tuple_cat ( _Tpls &&... __tpls) -> typename __tuple_cat_result<_Tpls...>::__type
constexpr

Create a tuple containing all elements from multiple tuple-like objects.

Definition at line 2779 of file tuple.

Variable Documentation

◆ ignore

_Swallow_assign std::ignore
inlineconstexpr

Used with std::tie to ignore an element of a tuple

When using std::tie to assign the elements of a tuple to variables, unwanted elements can be ignored by using std::ignore. For example:

int x, y;
constexpr tuple< typename __decay_and_strip< _Elements >::__type... > make_tuple(_Elements &&... __args)
Create a tuple containing copies of the arguments.
Definition tuple:2642
constexpr _Swallow_assign ignore
Definition tuple:2857
constexpr tuple< _Elements &... > tie(_Elements &... __args) noexcept
Return a tuple of lvalue references bound to the arguments.
Definition tuple:2793

This assignment will perform x=1; std::ignore=2; y=3; which results in the second element being ignored.

Since
C++11

Definition at line 2857 of file tuple.

◆ piecewise_construct

◆ tuple_size_v< const tuple< _Types... > >

template<typename... _Types>
size_t std::tuple_size_v< const tuple< _Types... > >
inlineconstexpr

Definition at line 2416 of file tuple.

◆ tuple_size_v< tuple< _Types... > >

template<typename... _Types>
size_t std::tuple_size_v< tuple< _Types... > >
inlineconstexpr

Definition at line 2412 of file tuple.