
On Jul 5, 2004, at 7:46 PM, David Abrahams wrote:
"Edward Diener" <eddielee@tropicsoft.com> writes:
What are the issues with call_traits which make it unusable ?
As far as I can tell, there is no clear documentation of what _precisely_ any partcular member of call_traits<T> is for a given T. It's even less clear what fallback the library uses when a full implementation of call_traits would require partial specialization that isn't available.
It seems as though the documentation is intended to be a more abstract description of what happens, but it leaves me (at least) feeling very unclear about what I'm actually getting.
It's also unclear to me what purpose is served by the "reference" and "const_reference" members.
As I recall, call_traits was intended to work around the "reference to reference" problem for both parameters and return types. This problem has since been solved by cwg #106 ( http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#106 ). Though I'm unsure how widely implemented this dr is in current compilers. I initially viewed call_traits as a way to optimize whether a type should be passed by const ref or by value. But I was mistaken. The real value was in passing/returning reference types without bumping into the reference-to-reference problem. -Howard