|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-11-13 16:20:05
From: "David Abrahams" <david.abrahams_at_[hidden]>
> So, if I have a generic function which may take a function or a function
> object, I am out of luck?
If you're on MSVC, then yes, you're out of luck, unfortunately. MSVC can't
handle an uniform syntax for the two cases.
> ...and will this syntax work with other compilers?
Yes, it will. It's supported so that function objects without ::result_type
can be bound.
In summary,
bind(R (*)(...), ...)
bind(R (X::*)(...), ...)
bind<R>(F, ...)
work on MSVC and above.
bind(F, ...) where there is F::result_type
bind<R>(R (*)(...), ...)
bind<R>(R (X::*)(...), ...)
should work as well on real compilers.
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk