// ---------------------------------------------------------------------- // // membrfwd.cc - Are forward declarations of template member functions ok? // // History: // 17-Aug-1999 WEB Initial draft // 19-Aug-1999 WEB Fix syntax error in f()'s return type // 25-Apr-2001 WEB s//"ISOcxx\/ISOcxxSyntax.hh"/ // // ---------------------------------------------------------------------- #include "ISOcxx/ISOcxxSyntax.hh" template< class T > struct C { int f( T const & ) const #if defined DEFECT_NO_TEMPLATE_MEMBER_FWDDECL { return 0; } #else ; #endif }; // C #if ! defined DEFECT_NO_TEMPLATE_MEMBER_FWDDECL template< class T > int C::f( T const & ) const { return 0; } // C::f() #endif int main() { return C().f( 16 ); } // main()