yat  0.20.3pre
Public Types | Public Member Functions | List of all members
theplu::yat::utility::PairFirst< Pair > Struct Template Reference

Functor that return std::pair.first. More...

#include <yat/utility/stl_utility.h>

Public Types

typedef boost::mpl::if_< typename boost::is_const< Pair >::type, typename boost::add_const< typename Pair::first_type >::type &, typename Pair::first_type & >::type result_type
 
typedef Pair & argument_type
 

Public Member Functions

result_type operator() (argument_type p) const
 

Detailed Description

template<class Pair>
struct theplu::yat::utility::PairFirst< Pair >

Functor that return std::pair.first.

See also
pair_first_iterator
Since
New in yat 0.5

Member Typedef Documentation

◆ argument_type

template<class Pair >
typedef Pair& theplu::yat::utility::PairFirst< Pair >::argument_type

The argument type is Pair&.

◆ result_type

template<class Pair >
typedef boost::mpl::if_< typename boost::is_const<Pair>::type, typename boost::add_const<typename Pair::first_type>::type&, typename Pair::first_type&>::type theplu::yat::utility::PairFirst< Pair >::result_type

The type returned is Pair::first_type& with the exception when Pair is const and Pair::first_type is non-const, in which case const Pair::first_type& is return type.

Member Function Documentation

◆ operator()()

template<class Pair >
result_type theplu::yat::utility::PairFirst< Pair >::operator() ( argument_type  p) const
inline
Returns
p.first

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

Generated on Sat Feb 18 2023 03:31:45 for yat by  doxygen 1.8.14