Applies element
conversion to each element in a Forward
Sequence. The resulting type is a Random
Access Sequence that provides a converting constructor accepting the
original type as its argument.
#include <boost/fusion/support/deduce_sequence.hpp>
namespace traits
{
template <class Sequence>
struct deduce_sequence
{
typedef unspecified type;
};
}
template <class Seq>
struct holder
{
typename traits::deduce_sequence<Seq>::type element;
holder(Seq const & a)
: element(a)
{ }
};
template <typename T0, typename T1>
holder< vector
<T0 const &, T1 const &> >
make_holder(T0 const & a0, T1 const & a1)
{
typedef vector
<T0 const &, T1 const &> arg_vec_t;
return holder<arg_vec_t>( arg_vec_t(a0,a1) );
}