mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
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:
parent
df6aa5540f
commit
320e3d6e47
12
configure.in
12
configure.in
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user