Subject: Re: [boost] [mpl] unexpected behaviour of mpl::add
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-08-19 10:55:07


AMDG

Thomas Heller wrote:
> I just noticed something i find very odd.
> Considering this example:
>
> mpl::add<mpl::int_<1>, mpl::int_<1>::type
>
> So I was expecting that this metafunction returns a mpl::int<2>
> Unfortunately, this was not the case, instead a mpl::integral_c<int, 2> was
> returned.
> Is this a bug or a feature?
>

This is the expected behavior. In general, MPL makes no
guarantees about the exact types resulting from operations.

In Christ,
Steven Watanabe