Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::compressed_pair< First, Second > Struct Template Reference

Public Types

using first_type = First
 
using second_type = Second
 

Public Member Functions

template<typename U , typename V >
constexpr compressed_pair (U &&u, V &&v) noexcept(noexcept(First((U &&) u)) &&noexcept(Second((V &&) v)))
 
constexpr First & first () &
 
constexpr First && first () &&
 
constexpr First const & first () const &
 
template<typename F , typename S >
constexpr operator std::pair< F, S > () const
 
constexpr Second & second () &
 
constexpr Second && second () &&
 
constexpr Second const & second () const &
 

Member Function Documentation

◆ operator std::pair< F, S >()

template<typename First , typename Second >
template<typename F , typename S >
constexpr ranges::compressed_pair< First, Second >::operator std::pair< F, S > ( ) const
constexpr
Precondition
requires convertible_to<First const &, F> && convertible_to<Second const &, S>

Constructor & Destructor Documentation

◆ compressed_pair()

template<typename First , typename Second >
template<typename U , typename V >
constexpr ranges::compressed_pair< First, Second >::compressed_pair ( U &&  u,
V &&  v 
)
constexprnoexcept
Precondition
requires constructible_from<First, U> && constructible_from<Second, V>