Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2006-06-26 10:45:39


Oleg Abrosimov wrote:
> Hello!
> I have one more need about tuples.
> I need two functions: one for general case and one for tuples returned
> by make_tuple function. It is equal to the following functionality
> provided by boost::variant library:
>
> "// general cases
> template <typename T> void some_func(const T &);
> template <typename T> class some_class;
>
> // function template overload
> template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
> void some_func(const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> &);
>
> // explicit partial specialization
> template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
> class some_class< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> >;"

For fusion, you can use enable_if and fusion::is_sequence.

HTH.

Cheers,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk