dnl @synopsis AC_CXX_TEMPLATE_QUALIFIED_RETURN_TYPE dnl dnl If the compiler supports template-qualified return types, define dnl HAVE_TEMPLATE_QUALIFIED_RETURN_TYPE. dnl dnl @version $Id: ac_cxx_template_qualified_return_type.m4,v 1.1.1.1 2001/07/26 00:46 ac-archive-0.5.39 $ dnl @author Luc Maisonobe dnl AC_DEFUN([AC_CXX_TEMPLATE_QUALIFIED_RETURN_TYPE], [AC_CACHE_CHECK(whether the compiler supports template-qualified return types, ac_cv_cxx_template_qualified_return_type, [AC_REQUIRE([AC_CXX_TYPENAME]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ #ifndef HAVE_TYPENAME #define typename #endif template struct promote_trait { typedef X T; }; template<> struct promote_trait { typedef float T; }; template class A { public : A () {} }; template A::T> operator+ (const A&, const A&) { return A::T>(); } ],[A x; A y; A z = x + y; return 0;], ac_cv_cxx_template_qualified_return_type=yes, ac_cv_cxx_template_qualified_return_type=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_template_qualified_return_type" = yes; then AC_DEFINE(HAVE_TEMPLATE_QUALIFIED_RETURN_TYPE,, [define if the compiler supports template-qualified return types]) fi ])