
On 3/20/07, Giovanni Piero Deretta <gpderetta@gmail.com> wrote:
On 3/20/07, Daniel Walker <daniel.j.walker@gmail.com> wrote:
Hello,
I noticed that result_of doesn't handle functors created by the Boost Lambda Library. [...] Among Boost libraries, there are at least two ways for function objects to expose return types that are dependent on the types of their arguments.
1) result_of instructs users to expose a template result<F(ARG1, ..., ARGN)>. 2) Boost.Lambda instructs users to expose a template sig<tuple<ARG1, ..., ARGN>, and it also uses this convention internally.
One more:
3) Fusion instruct users to expose a template result<ARG1... ARGN>.
But I guess it is not easy to distinguish this case from 1).
Thanks. I wasn't aware of this case. I was afraid there may be other conventions out there. I believe Boost.Typeof would handle the Fusion case as well as any future conventions adopted by future libraries. Still, for compilers that Boost.Typeof doesn't support, it would be nice if result_of could handle Boost.Lambda at least. More recent libraries and future libraries could consider adopting a previously existing practice (result<F(Args) or sig<tuple<Args> >) that result_of can support without typeof. Daniel