// ----------------------------------------------------------------------
//
// tmplmbr.cc - Are templated member functions of templated classes ok?
//
// History:
//   17-Sep-1999  WEB  Initial draft, based on membrfwd.cc
//   25-Apr-2001  WEB  s/<ISOcxxSyntax.hh>/"ISOcxx\/ISOcxxSyntax.hh"/
//
// ----------------------------------------------------------------------


#include "ISOcxx/ISOcxxSyntax.hh"

#if defined DEFECT_NO_MEMBER_TEMPLATES
# define  U  double
#endif


template< class T >
struct C  {

# if ! defined DEFECT_NO_MEMBER_TEMPLATES
  template< class U >
# endif
  T  f( U const & ) const
#   if defined DEFECT_NO_TEMPLATE_MEMBER_FWDDECL
    { return  T(); }
#   else
    ;
#   endif  /* DEFECT_NO_TEMPLATE_MEMBER_FWDDECL */

};  // C<T>


#if ! defined DEFECT_NO_TEMPLATE_MEMBER_FWDDECL

  template< class T >
#   if ! defined DEFECT_NO_MEMBER_TEMPLATES
    template< class U >
#   endif
  T  C<T>::f( U const & ) const  {

    return  T();

  }  // C::f()

#endif  /* DEFECT_NO_TEMPLATE_MEMBER_FWDDECL */


int  main()  {

  return  C<int>().f( 3.1415926 );

}  // main()
