Boost logo

Boost :

Subject: Re: [boost] [typeof] registration question
From: Cromwell Enage (sponage_at_[hidden])
Date: 2012-04-14 02:37:37


lcaminti wrote: > This works: > > #include <boost/typeof/typeof.hpp> > #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() > #include <boost/array.hpp> > > BOOST_TYPEOF_REGISTER_TEMPLATE(boost::array, >         (typename)(BOOST_TYPEOF_INTEGRAL(std::size_t))) > > int main() { return 0; } It works, indeed. > Read 3rd remark at: > http://www.boost.org/doc/libs/1_41_0/doc/html/typeof/refe.html#typeof.regtemp > > ``Enums and typedefs of integral types, need to be described explicitly with > the BOOST_TYPEOF_INTEGRAL macro, like (BOOST_TYPEOF_INTEGRAL(MyEnum))'' So THAT's what that macro is used for. > If you use size_t instead of std::size_t then it works even without the > INTEGRAL (read 2nd remark same link). Okay, I just need to be careful in avoiding type ambiguities, e.g. with boost::mpl::size_t. Thanks, again! Cromwell D. Enage


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk