
Brian McNamara <lorgon@cc.gatech.edu> writes:
On Tue, Feb 03, 2004 at 07:12:34AM -0500, David Abrahams wrote:
"Andy Little" <andy@servocomm.freeserve.co.uk> writes:
When used like this:
boost::mpl::plus<int_<1>,int_<1> >::type.
It is a compile time operation on the internal values of the int_'s
No it isn't. The above is nonsense and won't compile.
Ok, I confess I haven't been following this thread, and also I don't know MPL well. But what's wrong with the above?
#include <iostream> #include "boost/mpl/plus.hpp" #include "boost/mpl/int.hpp" using namespace boost::mpl; using std::cout; using std::endl; int main() { cout << plus< int_<1>, int_<1> >::type::value << endl; }
seems to work and prints "2".
Whoops; I was too hasty. What I read was: boost::mpl::plus<int_<_1>,int_<_1> >::type. ^ ^ Sorry everyone. -- Dave Abrahams Boost Consulting www.boost-consulting.com