Boost logo

Boost :

From: Marco Costalba (mcostalba_at_[hidden])
Date: 2007-10-01 02:07:26


On 10/1/07, Joel de Guzman <joel_at_[hidden]> wrote:
> Joel de Guzman wrote:
>
> Hence, I'd like to propose an extension (or a separate library)
> for allowing overloads for boost.function. The example above can
> be declared as:
>
> boost::overload<
> std::string(std::string, std:string)
> , std::string(std::string, char)
> , std::string(std::string, char const*)
> , std::string(char, std::string)
> , std::string(char const*, std::string)
> >
> concat;
>

Or possibly (perhaps)

typedef fusion::vector<
          std::string(std::string, std:string)
        , std::string(std::string, char)
        , std::string(std::string, char const*)
        , std::string(char, std::string)
        , std::string(char const*, std::string)
> overloads_sequence;

boost::overload<overloads_sequence> concat;

Just one question. Is it possible, given a class T to deduce its
implicit convrsions?

As example

class A {
 A();
 A(const A&) ;
 A(int);
 explicit A(double);
};

typedef implicit_conversions<A> implicits;

where 'implicits' is, as example, fusion::vector<void, int, double, const A&>

Thanks
Marco


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