|
Proto : |
Subject: Re: [proto] Latest proto commit on trunk.
From: Eric Niebler (eric_at_[hidden])
Date: 2011-05-09 21:36:23
On 5/10/2011 3:22 AM, Joel Falcou wrote:
> I got these error compiling NT2 with proto trunk
>
> /usr/local/include/boost-latest/boost/proto/detail/decltype.hpp:67:56:
> error: 'M0' has not been declared
> /usr/local/include/boost-latest/boost/proto/detail/decltype.hpp:67:1:
> error: expected identifier before '~' token
> /usr/local/include/boost-latest/boost/proto/detail/decltype.hpp:67:1:
> error: expected ')' before '~' token
> /usr/local/include/boost-latest/boost/proto/detail/decltype.hpp:67:1:
> error: ISO C++ forbids declaration of
> 'BOOST_PP_REPEAT_1_BOOST_PROTO_MAX_ARITY' with no type
> /usr/local/include/boost-latest/boost/proto/detail/decltype.hpp:67:1:
> error: expected ';' before '~' token
>
> Our code is :
>
> #include <boost/config.hpp>
> #include <boost/detail/workaround.hpp>
>
> #if BOOST_WORKAROUND(BOOST_MSVC, >= 1600) && defined BOOST_NO_DECLTYPE
> #undef BOOST_NO_DECLTYPE
> #endif
>
> #include <boost/proto/detail/decltype.hpp>
> #define NT2_DECLTYPE(EXPR, TYPE) BOOST_PROTO_DECLTYPE_(EXPR, TYPE)
>
> Is detail/decltype.hpp a no-go to reuse this way ?
Right, that's not going to work. I'm surprised it ever did.
> As for why we do this, we have to fight against some MSVC bug w/r to
> decltype that PROTO_DECLTYPE seemed to fix.
This is what happens to people who use stuff under a detail/ directory
or in a detail namespace. :-) You already know what I'm going to say:
don't do that.
Can you you boost/typeof.hpp?
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Proto list run by eric at boostpro.com