From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-07-19 15:48:22
On Friday 19 July 2002 04:21 pm, David Abrahams wrote:
> You can do it at runtime, but not compile-time. However, most compile-time
> things can be turned into runtime things that get compiled-away. It looks
> like you need the return type to be separated for MSVC, though, so you can
> declare the return type of operator(), but you might still be able to get
> this to work for the argument types.
> Oh, well, I guess deprecation isn't in the cards...
I'd be breaking backwards compatibility if the specified argument types
weren't used exactly in the operator() signature.
As it stands, the new syntax is available for any compiler with template
partial specialization. The old syntax with boost::function<...> is
deprecated, but lives on through boost::function0, boost::function1, etc. I
think it's a reasonable compromise, and maybe it'll prod a few more vendors
to clean up their act (neither Borland nor MSVC can parse function types
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk