16 Mar
2005
16 Mar
'05
12:35 a.m.
Ian McCulloch wrote:
Peter Dimov wrote:
Mini-result_of-tutorial:
Q: What do I write in the space marked ??? below:
template
??? apply( F f, A1 & a1, ..., An & an ) { return f( a1, ..., an ); } A:
typename result_of
::type. Is there any way to handle implicit conversions?
No, if I understand your question correctly. That is, from the caller's point of view there is nothing to handle: you just pass the types of a1, ..., an to result_of. However writing the correct result_of specialization for a function object that is not templated on its argument types, but has two or more operator() overloads and relies on implicit conversions would be a major pain. Do you have a use case in mind?