Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::mpl::plus changes type
From: Peter Foelsche (foelsche_at_[hidden])
Date: 2011-04-09 22:22:51

"Steven Watanabe" <watanabesj_at_[hidden]> wrote in message

> MPL in general gives no guarantee about the
> exact types that operations produce.

Please don't treat me like a customer of a US cellphone company (grin).

template<long I>
struct long_
{ static const long value = I;

    template<long J>
    struct create
    { typedef long_<J> type;

template<typename T0, typename T1>
struct plus
{ typedef typename T0::template create<T0::value + T1::value>::type type;

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at