From e299920b407fcb7e6f188eeb5e8b764bb32c6cfa 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) git-svn-id: svn://10.0.0.236/trunk@37439 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/configure.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mozilla/configure.in b/mozilla/configure.in index 151cfc2cc8e..cdca472437d 100644 --- a/mozilla/configure.in +++ b/mozilla/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