Boost logo

Boost :

Subject: Re: [boost] [Boost-users] [Review] Type Traits Introspection library by Edward Diener starts tomorrow Friday 1
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2011-07-16 16:05:41


>>    . BOOST_TTI_HAS_TEMPLATE, BOOST_TTI_VM_HAS_TEMPLATE_CHECK_PARAMS
>> and BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS: not clear from the table what
>> it checks for. Is there a class inside T that is declared templaste<
>> typename...>  name?
>
> Click on the metafunction name for more info.

Yes but it would be better to understand it directly from the table.

>> - the documentation of for each macro is too succinct. You should
>> re-explain the naming convention that will be used by the macro to
>> create the new trait. You could even just give the C++ code that will
>> be produced by the macro (just the visible code):
>>
>> BOOST_TTI_HAS_TYPE(name)
>> is equivalent to:
>> template<  typename T, typename U=notype>
>> struct has_type_name {
>>    const bool value;
>> };
>> with value ...
>>
>> In particular, examples are required for each of them.
>
> I hear you. I really don't want to duplicate the source code for each in the
> doc. Some are pretty long and involved.

In fact just the following would be enough:
template< typename T, typename U=notype>
struct has_type_name;

> My tests did not really test
> const/volatile cases but I think this is much less of an eventual problem.

OK for const but I would not bet on volatile...

Good job Eddie. Cheers,

Frédéric


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