[EMAIL PROTECTED] writes: >> From: Eric Niebler [mailto:[EMAIL PROTECTED] >> 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 www.boost-consulting.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost