|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2005-05-21 18:37:57
"Arkadiy Vertleyb" <vertleyb_at_[hidden]> writes:
> "David Abrahams" <dave_at_[hidden]> wrote
>
>> Naw... anything of the form
>>
>> metafunction1< metafunction2< ... >::type >::type
>>
>> can be collapsed into
>>
>> metafunction3< ... >::type
>>
>> where
>>
>> template <class T>
>> struct metafunction3
>> : metafunction1< typename metafunction2< T >::type >
>> {};
>>
>> So there should be no need for any _TPL suffixes.
>
> Please note however, that we do not strictly operate with
> metafunctions. The argument of TYPEOF can't be passed to a
> metafunction, which does change the rules.
I don't understand. You can't write
template <class T>
struct decode_type_begin
: boost::type_of::decode_type<
typename boost::mpl::begin<T>::type
>
{};
#define BOOST_TYPEOF(Expr) \
boost::type_of::decode_type_begin< \
BOOST_TYPEOF_VECTOR(BOOST_TYPEOF_LIMIT_SIZE)< \
BOOST_PP_ENUM(BOOST_TYPEOF_LIMIT_SIZE, BOOST_TYPEOF_TYPEITEM, Expr) \
> \
>::type
??
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk