// ----------------------------------------------------------------------
//
// partspec.cc - Do we support template partial specialization?
//
// History:
//   11-Aug-1999  WEB  Initial draft, adapted from Blitz++
//   25-Apr-2001  WEB  s/<ISOcxxSyntax.hh>/"ISOcxx\/ISOcxxSyntax.hh"/
//
// ----------------------------------------------------------------------


#include "ISOcxx/ISOcxxSyntax.hh"


template< class T, int N >
struct C  {

  enum  { Z = 0 };

};  // C<T,N>


#if ! defined DEFECT_NO_PARTIAL_SPECIALIZATION

  template< int N >
  struct C< double, N >  {

    enum  { Z = 1 };

  };  // C<double,N>


  template< class T >
  struct C< T, 2 >  {

    enum  { Z = 2 };

  };  // C<T,2>

#endif // DEFECT_NO_PARTIAL_SPECIALIZATION


int  main()  {

  return  ( 0 != C<int   ,0>::Z ) ? C<int   ,0>::Z  // general case <T,N>
#if ! defined DEFECT_NO_PARTIAL_SPECIALIZATION
       :  ( 1 != C<double,1>::Z ) ? C<double,1>::Z  // partial spec <double,N>
       :  ( 2 != C<float ,2>::Z ) ? C<float ,2>::Z  // partial spec <T,2>
#endif
       :                            0
       ;

}  // main()
