Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::result_of::extract_or_default< T, DefaultT, TagT > Struct Template Reference

A metafunction that allows to acquire the result of the value extraction. More...

#include <value_extraction_fwd.hpp>

Public Types

typedef mpl::eval_if
< mpl::is_sequence< T >
, mpl::eval_if< mpl::contains
< T, DefaultT >, mpl::identity
< T >, mpl::push_back< T,
DefaultT > >, mpl::if_
< is_same< T, DefaultT >, T,
mpl::vector2< T, DefaultT >
> >::type 
extracted_type
 
typedef mpl::if_
< mpl::is_sequence
< extracted_type >, value_ref
< extracted_type, TagT >
, extracted_type const & >
::type 
type
 

Detailed Description

template<typename T, typename DefaultT, typename TagT>
struct boost::result_of::extract_or_default< T, DefaultT, TagT >

A metafunction that allows to acquire the result of the value extraction.

The metafunction results in a type that is in form of T const&, if T is not an MPL type sequence and DefaultT is the same as T, or value_ref< TypesT, TagT > otherwise, with TypesT being a type sequence comprising the types from sequence T and DefaultT, if it is not present in T already.

Member Typedef Documentation

template<typename T , typename DefaultT , typename TagT >
typedef mpl::eval_if< mpl::is_sequence< T >, mpl::eval_if< mpl::contains< T, DefaultT >, mpl::identity< T >, mpl::push_back< T, DefaultT > >, mpl::if_< is_same< T, DefaultT >, T, mpl::vector2< T, DefaultT > > >::type boost::result_of::extract_or_default< T, DefaultT, TagT >::extracted_type
template<typename T , typename DefaultT , typename TagT >
typedef mpl::if_< mpl::is_sequence< extracted_type >, value_ref< extracted_type, TagT >, extracted_type const& >::type boost::result_of::extract_or_default< T, DefaultT, TagT >::type

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