Boost logo

Boost :

From: Doug Gregor (gregod_at_[hidden])
Date: 2001-04-09 21:03:27


On Monday 09 April 2001 10:30, you wrote:
> #include <boost/any_function.hpp>
>
> int f()
> {
> return 0;
> }
>
> int main()
> {
> boost::any_function<int, int> F(f);
> return 0;
> }
>
> compiles. Is this by design? Desirable?

It shouldn't. The instantiation of the appropriate invoker
(boost::detail::function_invoker_1) fails. Both g++ and Comeau correctly
diagnose the problem - which compiler are you seeing this with?

        Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk