Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2004-09-02 07:36:09

"David Abrahams" <dave_at_[hidden]> wrote

> I had to add this to get some tests for the TMP book to pass:
> namespace boost { namespace lambda {
> template<int N>
> struct
> plain_return_type_2<arithmetic_action<plus_action>, char[N],
std::string> {
> typedef std::string type;
> };
> }} // namespace boost::lambda
> Obviously this could be generalized for basic_string and for the
> reversed arguments.

The binary_operation version would look something like this with the its
new enable_if functionality
Zounds! this enable_if is Fun :-) ... perhaps could be done in Lambda?,

    template <typename L, typename R>
    struct binary_operation<
        typename boost::enable_if<
                    typename pqs::meta::to_value_type<L>::type,
                    typename pqs::meta::to_value_type<R>::type
        typedef typename boost::mpl::if_<
>::type result_type;

Andy Little

Boost list run by bdawes at, gregod at, cpdaniel at, john at