Boost logo

Boost :

From: Christopher Currie (christopher_at_[hidden])
Date: 2003-11-20 12:53:24


Christopher Currie wrote:
> The Sun compiler has no problem with the first foo() call, but fails to
> compile the second. Curiously, if I add this declaration:
>
> template < typename T > void foo( T );
>
> making the function definition a partial specialization, it compiles
> without difficulty.

Correction: it compiles, but doesn't link, because it's looking for the
default implementation that doesn't exist. But if I make the last call:

        foo( static_cast< int(X::*)() >( &X::f0 ) );

Which, to my mind, is redunant, the file links and runs fine.

Anyway, same question applies, I just wanted to correct myself.

Christopher


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