// DESCRIPTION // // Test to check whether the C++ compiler supports numeric traits promotions. // In sync with AC_CXX_USE_NUMTRAIT (2008-04-12). // // COPYLEFT // // Copyright (c) 2008 Todd Veldhuizen // Copyright (c) 2009 Theo Papadopoulo // Copyright (c) 2008 Luc Maisonobe // // Copying and distribution of this file, with or without modification, are // permitted in any medium without royalty provided the copyright notice // and this notice are preserved. #ifndef HAVE_TYPENAME #define typename #endif template class SumType { public: typedef T_numtype T_sumtype; }; template<> class SumType { public: typedef int T_sumtype; }; template class A {}; template A::T_sumtype> sum(A) { return A::T_sumtype>(); } int main() { A x; sum(x); return 0; }