Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-11-20 13:01:26

Christopher Currie wrote:
> 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.

It is not. The type of &X::f0 is int (B::*) ().

Boost list run by bdawes at, gregod at, cpdaniel at, john at