VCCC  2024.05
VisualCamp Common C++ library
compressed_pair< T, U > Class Template Reference

#include </home/jarvis/actions-runner/jarvis-vccc-2/_work/vccc/vccc/include/vccc/__utility/compressed_pair.hpp>

+ Inheritance diagram for compressed_pair< T, U >:

Public Types

using first_type = T
 
using second_type = U
 

Public Member Functions

constexpr compressed_pair ()=default
 
template<typename T2 , std::enable_if_t< std::is_constructible< T, T2 >::value, int > = 0>
constexpr compressed_pair (T2 &&t, compressed_pair_empty_t)
 
template<typename U2 , std::enable_if_t< std::is_constructible< U, U2 >::value, int > = 0>
constexpr compressed_pair (compressed_pair_empty_t, U2 &&u)
 
template<typename T2 , typename U2 , std::enable_if_t< conjunction< std::is_constructible< T, T2 >, std::is_constructible< U, U2 > >::value, int > = 0>
constexpr compressed_pair (T2 &&t, U2 &&u)
 
constexpr T & first () &noexcept
 
constexpr T && first () &&noexcept
 
constexpr const T & first () const &noexcept
 
constexpr const T && first () const &&noexcept
 
constexpr U & second () &noexcept
 
constexpr U && second () &&noexcept
 
constexpr const U & second () const &noexcept
 
constexpr const U && second () const &&noexcept
 
constexpr std::enable_if_t< conjunction< is_swappable< T >, is_swappable< U > >::valueswap (compressed_pair &other) noexcept(conjunction< is_nothrow_swappable< T >, is_nothrow_swappable< U >>::value)
 

Member Typedef Documentation

◆ first_type

using first_type = T

◆ second_type

using second_type = U

Constructor & Destructor Documentation

◆ compressed_pair() [1/4]

constexpr compressed_pair ( )
constexprdefault

◆ compressed_pair() [2/4]

constexpr compressed_pair ( T2 &&  t,
compressed_pair_empty_t   
)
inlineconstexpr

◆ compressed_pair() [3/4]

constexpr compressed_pair ( compressed_pair_empty_t  ,
U2 &&  u 
)
inlineconstexpr

◆ compressed_pair() [4/4]

constexpr compressed_pair ( T2 &&  t,
U2 &&  u 
)
inlineconstexpr

Member Function Documentation

◆ first() [1/4]

constexpr T&& first ( ) &&
inlineconstexprnoexcept

◆ first() [2/4]

constexpr T& first ( ) &
inlineconstexprnoexcept

◆ first() [3/4]

constexpr const T&& first ( ) const &&
inlineconstexprnoexcept

◆ first() [4/4]

constexpr const T& first ( ) const &
inlineconstexprnoexcept

◆ second() [1/4]

constexpr U&& second ( ) &&
inlineconstexprnoexcept

◆ second() [2/4]

constexpr U& second ( ) &
inlineconstexprnoexcept

◆ second() [3/4]

constexpr const U&& second ( ) const &&
inlineconstexprnoexcept

◆ second() [4/4]

constexpr const U& second ( ) const &
inlineconstexprnoexcept

◆ swap()

constexpr std::enable_if_t<conjunction<is_swappable<T>, is_swappable<U> >::value> swap ( compressed_pair< T, U > &  other)
inlineconstexprnoexcept

The documentation for this class was generated from the following file: