|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-10-29 16:09:44
Eric Niebler:
>> I think I'm arguing for a documented registration interface that looks
>> like
>> this:
>>
>> namespace boost
>> {
>>
>> namespace type_of
>> {
>>
>> template< class V, class T > struct encode_type;
>>
>> template<> struct encode_type< whatever-is-required >
>> {
>> whatever-is-required;
>> };
>>
>> } // namespace type_of
>>
>> } // namespace boost
>>
>> I've no idea how practical is that.
>
>
> I'm confused. There already is a documented registration interface
> (involving macros).
Yes.
The current registration interface requires me to #include
<boost/typeof.hpp>, then #include BOOST_TYPEOF_SOMETHING(), then use a
macro. These headers in turn include MPL headers, PP headers and who knows
what else.
I'm saying that if the registration interface did not require me to include
any header, then I'd be willing to register all my types and templates at
the point of their definition.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk