Boost logo

Boost Users :

Subject: Re: [Boost-users] [mpl] Syntax error with BOOST_MPL_ASSERT
From: Christopher Schmidt (mr.chr.schmidt_at_[hidden])
Date: 2009-10-11 08:27:00


comment inline...

Jean-Louis Leroy schrieb:
> What's wrong with this ?
>
> template<class Expected, class T>
> void check_placeholders(const T&) {
> BOOST_MPL_ASSERT((is_same<typename T::placeholders, Expected>)); // *
boost::is_same
> }
>
> struct Test {
> typedef int placeholders;
> };
>
> void f() {
> check_placeholders<int>(Test());
> }
>
> msvc9 complains about : error C2059: syntax error : ')' at the line
> marked with a star. I have put much more complex things inside
> BOOST_MPL_ASSERT though :-/
>
> I use Boost 1.40.
>
> J-L

-Christopher


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net