mn::compressed_pair< T, U, typename > Class Template Reference

#include <mn_compressed_pair.hpp>

+ Collaboration diagram for mn::compressed_pair< T, U, typename >:

Public Types

using self_type = compressed_pair< T, U >
 
using first_value_type = typename type_traits< T >::value_type
 
using first_reference = typename type_traits< T >::reference
 
using first_const_reference = typename type_traits< T >::const_reference
 
using second_value_type = typename type_traits< U >::value_type
 
using second_reference = typename type_traits< U >::reference
 
using second_const_reference = typename type_traits< U >::const_reference
 

Public Member Functions

constexpr compressed_pair ()=default
 
 compressed_pair (first_const_reference f) noexcept
 
 compressed_pair (second_const_reference s) noexcept
 
constexpr compressed_pair (first_const_reference f, second_const_reference s) noexcept
 
constexpr compressed_pair (const self_type &other) noexcept
 
first_reference first () noexcept
 
constexpr first_const_reference first () const noexcept
 
second_reference second () noexcept
 
constexpr second_const_reference second () const noexcept
 
void swap (self_type &o)
 

Private Attributes

ebo_storage< T, 0 > m_first
 
ebo_storage< U, 1 > m_second
 

Detailed Description

template<typename T, typename U, typename = void>
class mn::compressed_pair< T, U, typename >

A simple compressed pair

Template Parameters
Ttype for first value.
Utype for second value.

Member Typedef Documentation

◆ first_const_reference

template<typename T , typename U , typename = void>
using mn::compressed_pair< T, U, typename >::first_const_reference = typename type_traits<T>::const_reference

◆ first_reference

template<typename T , typename U , typename = void>
using mn::compressed_pair< T, U, typename >::first_reference = typename type_traits<T>::reference

◆ first_value_type

template<typename T , typename U , typename = void>
using mn::compressed_pair< T, U, typename >::first_value_type = typename type_traits<T>::value_type

◆ second_const_reference

template<typename T , typename U , typename = void>
using mn::compressed_pair< T, U, typename >::second_const_reference = typename type_traits<U>::const_reference

◆ second_reference

template<typename T , typename U , typename = void>
using mn::compressed_pair< T, U, typename >::second_reference = typename type_traits<U>::reference

◆ second_value_type

template<typename T , typename U , typename = void>
using mn::compressed_pair< T, U, typename >::second_value_type = typename type_traits<U>::value_type

◆ self_type

template<typename T , typename U , typename = void>
using mn::compressed_pair< T, U, typename >::self_type = compressed_pair<T, U>

Constructor & Destructor Documentation

◆ compressed_pair() [1/5]

template<typename T , typename U , typename = void>
constexpr mn::compressed_pair< T, U, typename >::compressed_pair ( )
constexprdefault

◆ compressed_pair() [2/5]

template<typename T , typename U , typename = void>
mn::compressed_pair< T, U, typename >::compressed_pair ( first_const_reference  f)
inlineexplicitnoexcept

◆ compressed_pair() [3/5]

template<typename T , typename U , typename = void>
mn::compressed_pair< T, U, typename >::compressed_pair ( second_const_reference  s)
inlineexplicitnoexcept

◆ compressed_pair() [4/5]

template<typename T , typename U , typename = void>
constexpr mn::compressed_pair< T, U, typename >::compressed_pair ( first_const_reference  f,
second_const_reference  s 
)
inlineconstexprnoexcept

◆ compressed_pair() [5/5]

template<typename T , typename U , typename = void>
constexpr mn::compressed_pair< T, U, typename >::compressed_pair ( const self_type other)
inlineconstexprnoexcept

Member Function Documentation

◆ first() [1/2]

template<typename T , typename U , typename = void>
constexpr first_const_reference mn::compressed_pair< T, U, typename >::first ( ) const
inlineconstexprnoexcept

◆ first() [2/2]

template<typename T , typename U , typename = void>
first_reference mn::compressed_pair< T, U, typename >::first ( )
inlinenoexcept

◆ second() [1/2]

template<typename T , typename U , typename = void>
constexpr second_const_reference mn::compressed_pair< T, U, typename >::second ( ) const
inlineconstexprnoexcept

◆ second() [2/2]

template<typename T , typename U , typename = void>
second_reference mn::compressed_pair< T, U, typename >::second ( )
inlinenoexcept

◆ swap()

template<typename T , typename U , typename = void>
void mn::compressed_pair< T, U, typename >::swap ( self_type o)
inline

Member Data Documentation

◆ m_first

template<typename T , typename U , typename = void>
ebo_storage<T, 0> mn::compressed_pair< T, U, typename >::m_first
private

◆ m_second

template<typename T , typename U , typename = void>
ebo_storage<U, 1> mn::compressed_pair< T, U, typename >::m_second
private

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