From d5a19832432aeb849fa20f60f5782fa95de5b9b6 Mon Sep 17 00:00:00 2001 From: "shaver%netscape.com" Date: Tue, 29 Jun 1999 20:41:39 +0000 Subject: [PATCH] add configure test for C++ template specialization for scc (HAVE_CPP_SPECIALIZATION) --- configure.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/configure.in b/configure.in index 151cfc2cc8e..cdca472437d 100644 --- a/configure.in +++ b/configure.in @@ -1360,6 +1360,23 @@ if test "$ac_cv_cpp_explicit" = yes ; then AC_DEFINE(HAVE_CPP_EXPLICIT) fi +dnl Check for template specialization +dnl Test code and requirement from scc@netscape.com. +dnl Autoconf cut-and-paste job by shaver@mozilla.org. +AC_CACHE_CHECK(for C++ template specialization support, + ac_cv_cpp_template_specialization, + [AC_TRY_COMPILE(template struct X { int a; }; + class Y {}; + template <> struct X { double a; };, + X int_x; + X y_x;, + ac_cv_cpp_template_specialization=yes, + ac_cv_cpp_template_specialization=no)]) +if test "$ac_cv_cpp_template_specialization" = yes ; then + AC_DEFINE(HAVE_CPP_SPECIALIZATION) +fi + + dnl dnl We dont do exceptions on unix. The only reason this used to be here dnl is that mozilla/xpcom/tests/TestCOMPtr.cpp has a test which uses