I'm stumped. This only gives me an error if the class is a template and the functions are declared within the class. Here's a stripped-down example:
The error doesn't make much sense either:Code:template < typename T > struct foo { friend void bar( foo< T > const& data, bool condition = false ) { } friend void qux( foo< T > const& data ) { bar( data ); } }; int main( void ) { qux( foo< int >( ) ); return 0; }
"default argument given for parameter 2 of `void bar(const foo<int>&, bool)' after previous specification in `void bar(const foo<int>&, bool)'.
Any ideas?



LinkBack URL
About LinkBacks


