// ---------------------------------------------------------------------- // // fullspec.cc - Do we support template full specialization? // // History: // 17-Sep-1999 WEB Initial draft, adapted from partspec.cc // 25-Apr-2001 WEB s//"ISOcxx\/ISOcxxSyntax.hh"/ // // ---------------------------------------------------------------------- #include "ISOcxx/ISOcxxSyntax.hh" template< class T, int N > struct C { enum { Z = 0 }; }; // C #if ! defined DEFECT_NO_FULL_SPECIALIZATION_SYNTAX template<> struct C< bool, 3 > { enum { Z = 3 }; }; // C #endif // DEFECT_NO_FULL_SPECIALIZATION_SYNTAX int main() { return ( 0 != C::Z ) ? C::Z // general case #if ! defined DEFECT_NO_PARTIAL_SPECIALIZATION : ( 3 != C::Z ) ? C::Z // complete spec #endif : 0 ; } // main()