Subject: Re: [boost] [mpl] unexpected behaviour of mpl::add
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-08-19 10:55:07
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
> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk