// ----------------------------------------------------------------------
//
// tmplinit.cc - Do we support const static data members' initializers?
//
// History:
//   27-Sep-1999  WEB  Initial draft, adapted from STLport
//   25-Apr-2001  WEB  s/<ISOcxxSyntax.hh>/"ISOcxx\/ISOcxxSyntax.hh"/
//
// ----------------------------------------------------------------------


#include "ISOcxx/ISOcxxSyntax.hh"


// ----------------------------------------------------------------------
// define a generic class with a static member:
// ----------------------------------------------------------------------

template< class T >
struct  C  {

#if ! defined DEFECT_NO_STATIC_CONST_INIT  /* compliant */
  static  int const  i = 0;
#endif

};  // C<T>


// ----------------------------------------------------------------------
// define the templated statics:
// ----------------------------------------------------------------------

#if ! defined DEFECT_NO_STATIC_CONST_INIT  /* compliant */
template< class T >
int const  C<T>::i;
#endif


// ----------------------------------------------------------------------
// test driver:
// ----------------------------------------------------------------------

int  main()  {

#if ! defined DEFECT_NO_STATIC_CONST_INIT  /* compliant */
  return  C<float>::i;
#else                                      /* defective */
  return  0;
#endif

}  // main()
