Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-03-21 09:39:51

scleary_at_[hidden] writes:

>> From: Eric Niebler [mailto:neric_at_[hidden]]
>> Is this an oversight in call_traits?
> Look at the "Examples" table in the call_traits documentation. If this is
> not the behavior you want, use call_traits<int> (or, generically,
> call_traits<remove_reference<T>::type>).
>> Or just an unfortunately named typedef?
> call_traits was originally designed to help the implementation of
> compressed_pair. So the name "value_type" was used because it was the
> natural name for the type of the members within compressed_pair. i.e., if
> you wanted to declare a variable that could hold the requested value, it
> would be of type value_type. The "value_type" member since then has become
> commonly used as a return type for those types of values. I agree, it is an
> "unfortunately named typedef".

The whole "traits blob anti-pattern" design of call_traits is
unfortunate, IMO.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at