Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
define_adaptor.hpp File Reference
Include dependency graph for define_adaptor.hpp:

Macros

#define BOOST_DEFINE_RANGE_ADAPTOR(adaptor_name, range_adaptor)
 
#define BOOST_DEFINE_RANGE_ADAPTOR_1(adaptor_name, range_adaptor, arg1_type)
 
#define BOOST_RANGE_ADAPTOR_2(adaptor_name, range_adaptor, arg1_type, arg2_type)
 

Macro Definition Documentation

#define BOOST_DEFINE_RANGE_ADAPTOR (   adaptor_name,
  range_adaptor 
)
Value:
struct adaptor_name##_forwarder {}; \
\
template<typename Range> range_adaptor <Range> \
operator|(Range& rng, adaptor_name##_forwarder) \
{ \
return range_adaptor <Range>( rng ); \
} \
\
template<typename Range> range_adaptor <const Range> \
operator|(const Range& rng, adaptor_name##_forwarder) \
{ \
return range_adaptor <const Range>( rng ); \
} \
\
static adaptor_name##_forwarder adaptor_name = adaptor_name##_forwarder(); \
\
template<typename Range> \
range_adaptor <Range> \
make_##adaptor_name(Range& rng) \
{ \
return range_adaptor <Range>(rng); \
} \
\
template<typename Range> \
range_adaptor <const Range> \
make_##adaptor_name(const Range& rng) \
{ \
return range_adaptor <const Range>(rng); \
}
#define BOOST_DEFINE_RANGE_ADAPTOR_1 (   adaptor_name,
  range_adaptor,
  arg1_type 
)
#define BOOST_RANGE_ADAPTOR_2 (   adaptor_name,
  range_adaptor,
  arg1_type,
  arg2_type 
)
Value:
struct adaptor_name \
{ \
explicit adaptor_name (arg1_type arg1_, arg2_type arg2_) \
: arg1(arg1_), arg2(arg2_) {} \
arg1_type arg1; \
arg2_type arg2; \
}; \
\
template<typename Range> range_adaptor <Range> \
operator|(Range& rng, adaptor_name args) \
{ \
return range_adaptor <Range>(rng, args.arg1, args.arg2); \
} \
template<typename Range> \
range_adaptor <Range> \
make_##adaptor_name(Range& rng, arg1_type arg1, arg2_type arg2) \
{ \
return range_adaptor <Range>(rng, arg1, arg2); \
} \
template<typename Range> \
range_adaptor <const Range> \
make_##adaptor_name(const Range& rng, arg1_type arg1, arg2_type arg2) \
{ \
return range_adaptor <const Range>(rng, arg1, arg2); \
}
actor< argument< 1 > > const arg2
Definition: primitives.hpp:65
actor< argument< 0 > > const arg1
Definition: primitives.hpp:64
detail::keywords< 1 > args(char const *name)
Definition: args.hpp:156