From: Marco Costalba (mcostalba_at_[hidden])
Date: 2007-10-01 13:15:19


I wanted to add the final touch, from :

>
> template <typename Seq>
> struct overload : detail::compose_overload_base<Seq>::type
> {
> typedef typename tuples::element<0, Seq>::type Sig0;
> typedef typename tuples::element<1, Seq>::type Sig1;
> typedef typename tuples::element<2, Seq>::type Sig2;
> typedef typename tuples::element<3, Seq>::type Sig3;
>
> typedef
> tuple<
> boost::function<Sig0>
> , boost::function<Sig1>
> , boost::function<Sig2>
> , boost::function<Sig3>
> >
> functions_type;

to

namespace detail
    {
       struct get_function
        {
           template <typename T>
           struct apply
           {
               typedef boost::function<T> type;
           };
        };
    }

    template <typename Seq>
    struct overload : detail::compose_overload_base<Seq>::type
    {
            typedef typename boost::mpl::
            transform<Seq, detail::get_function>::type functions_type;

But i have a strange compile error.

[snip]

overload.cpp:45: instantiated from here
boost_dir/boost/mpl/clear.hpp:31: error: invalid use of incomplete
type 'struct boost::mpl::clear_impl<boost::mpl::non_sequence_tag>::apply<boost::tuples::tuple<int
()(char), double ()(int, char), char ()(std::string), v

[snip]

I have included

#include <boost/mpl/transform.hpp>

but proabbly I'm missing something...

Could someone help me? I'm new to boost.

Thanks
Marco