cli11
Loading...
Searching...
No Matches
cli::detail::pair_adaptor< T > Struct Template Referenceexport
module cli11

Adapts containers whose elements really are pairs. More...

Inheritance diagram for cli::detail::pair_adaptor< T >:

Public Types

using value_type = typename T::value_type
 The container's element type.
using first_type = std::remove_const_t<typename value_type::first_type>
 The key type.
using second_type = std::remove_const_t<typename value_type::second_type>
 The mapped type.

Static Public Member Functions

template<typename Q>
static auto first (Q &&pair_value) -> decltype(std::get< 0 >(std::forward< Q >(pair_value)))
 Returns the key half of an element.
template<typename Q>
static auto second (Q &&pair_value) -> decltype(std::get< 1 >(std::forward< Q >(pair_value)))
 Returns the mapped half of an element.

Detailed Description

template<pair_valued T>
struct cli::detail::pair_adaptor< T >

Adapts containers whose elements really are pairs.

Member Function Documentation

◆ first()

template<pair_valued T>
template<typename Q>
auto cli::detail::pair_adaptor< T >::first ( Q && pair_value) -> decltype(std::get< 0 >(std::forward< Q >(pair_value)))
inlinestatic

Returns the key half of an element.

Parameters
pair_valueThe element.
Returns
The key.

◆ second()

template<pair_valued T>
template<typename Q>
auto cli::detail::pair_adaptor< T >::second ( Q && pair_value) -> decltype(std::get< 1 >(std::forward< Q >(pair_value)))
inlinestatic

Returns the mapped half of an element.

Parameters
pair_valueThe element.
Returns
The mapped value.

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