Add compiler test for external template specializations in c++ (assumed on for msvc)

Thanks to Benjamin Smedberg <bsmedberg@covad.net> for the patch.
Bug #184002 r=scc
This commit is contained in:
seawood%netscape.com 2002-12-17 22:11:34 +00:00
parent df6aa5540f
commit 320e3d6e47
3 changed files with 189 additions and 142 deletions

318
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -2464,6 +2464,18 @@ if test "$ac_cv_cpp_partial_specialization" = yes ; then
AC_DEFINE(HAVE_CPP_PARTIAL_SPECIALIZATION)
fi
dnl Some compilers support extern declarations of explicit template instantiations.
AC_CACHE_CHECK(for extern explicit template instantiation,
ac_cv_cpp_extern_instantiation,
[AC_TRY_COMPILE(template<class T> class Foo{ T a; };
extern template Foo<int>;,
,
ac_cv_cpp_extern_instantiation=yes,
ac_cv_cpp_extern_instantiation=no)])
if test "$ac_cv_cpp_extern_instantiation" = yes ; then
AC_DEFINE(HAVE_CPP_EXTERN_INSTANTIATION)
fi
dnl Some compilers have limited support for operators with templates;
dnl specifically, it is necessary to define derived operators when a base

View File

@ -187,6 +187,7 @@ typedef PRUint32 nsresult;
/* VC++ 5.0 and greater implement template specialization, 4.2 is unknown */
#define HAVE_CPP_SPECIALIZATION
#define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX
#define HAVE_CPP_EXTERN_INSTANTIATION
#define HAVE_CPP_EXPLICIT
#define HAVE_CPP_TYPENAME