David Abrahams <[EMAIL PROTECTED]> wrote:
> Jaakko Jarvi <[EMAIL PROTECTED]> writes:
> 
>> I've noticed that call_traits doesn't support function references.
>> I'm not sure whether it makes sense to store function references in
>> optionals, though, but in any case.
>> 
>> Something like this fails:
>> 
>> typedef void (&afuncref)(int);
>> typedef call_traits<afunc>::reference t;
>> 
>> The problem is that the call_traits templates have other typedefs in
>> the same class, e.g. const_reference, which gets instantiated as
>> well, and it adds the const qualifier to a function type.
> 
> Just another reason not to write degenerate "traits BLOB"
> metafunctions.  call_traits, if it's useful for anything (which I
> sometimes wonder about because I have a hard time figuring out what it
> does), should be rewritten as separate individual metafunctions.

FWIW, I find it a useful utility. However, I agree that it should be 
broken down into individual pieces.

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to