|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61930 - in trunk: boost/config/compiler libs/config/test
From: john_at_[hidden]
Date: 2010-05-12 08:34:46
Author: johnmaddock
Date: 2010-05-12 08:34:45 EDT (Wed, 12 May 2010)
New Revision: 61930
URL: http://svn.boost.org/trac/boost/changeset/61930
Log:
Tentative fix for BOOST_NO_EXTERN_TEMPLATE: previous test case was invalid.
Text files modified:
trunk/boost/config/compiler/common_edg.hpp | 2 +-
trunk/boost/config/compiler/gcc.hpp | 3 ++-
trunk/boost/config/compiler/visualc.hpp | 2 +-
trunk/libs/config/test/boost_no_extern_template.ipp | 21 ++++++++++++++++++++-
4 files changed, 24 insertions(+), 4 deletions(-)
Modified: trunk/boost/config/compiler/common_edg.hpp
==============================================================================
--- trunk/boost/config/compiler/common_edg.hpp (original)
+++ trunk/boost/config/compiler/common_edg.hpp 2010-05-12 08:34:45 EDT (Wed, 12 May 2010)
@@ -62,6 +62,7 @@
#if (__EDG_VERSION__ <= 310) || !defined(BOOST_STRICT_CONFIG)
// No support for initializer lists
# define BOOST_NO_INITIALIZER_LISTS
+# define BOOST_NO_EXTERN_TEMPLATE
#endif
#define BOOST_NO_AUTO_DECLARATIONS
@@ -74,7 +75,6 @@
#define BOOST_NO_DEFAULTED_FUNCTIONS
#define BOOST_NO_DELETED_FUNCTIONS
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_EXTERN_TEMPLATE
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_LAMBDAS
#define BOOST_NO_NULLPTR
Modified: trunk/boost/config/compiler/gcc.hpp
==============================================================================
--- trunk/boost/config/compiler/gcc.hpp (original)
+++ trunk/boost/config/compiler/gcc.hpp 2010-05-12 08:34:45 EDT (Wed, 12 May 2010)
@@ -42,6 +42,7 @@
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
# define BOOST_NO_IS_ABSTRACT
+# define BOOST_NO_EXTERN_TEMPLATE
#elif __GNUC__ == 3
# if defined (__PATHSCALE__)
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
@@ -58,6 +59,7 @@
# if __GNUC_MINOR__ < 4
# define BOOST_NO_IS_ABSTRACT
# endif
+# define BOOST_NO_EXTERN_TEMPLATE
#endif
#if __GNUC__ < 4
//
@@ -119,7 +121,6 @@
// C++0x features not implemented in any GCC version
//
#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_EXTERN_TEMPLATE
#define BOOST_NO_NULLPTR
#define BOOST_NO_TEMPLATE_ALIASES
Modified: trunk/boost/config/compiler/visualc.hpp
==============================================================================
--- trunk/boost/config/compiler/visualc.hpp (original)
+++ trunk/boost/config/compiler/visualc.hpp 2010-05-12 08:34:45 EDT (Wed, 12 May 2010)
@@ -68,6 +68,7 @@
# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
# define BOOST_NO_IS_ABSTRACT
# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
+# define BOOST_NO_EXTERN_TEMPLATE
// TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)?
# if (_MSC_VER > 1200)
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
@@ -186,7 +187,6 @@
#define BOOST_NO_DECLTYPE
#define BOOST_NO_DELETED_FUNCTIONS
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_EXTERN_TEMPLATE
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_INITIALIZER_LISTS
#define BOOST_NO_RAW_LITERALS
Modified: trunk/libs/config/test/boost_no_extern_template.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_extern_template.ipp (original)
+++ trunk/libs/config/test/boost_no_extern_template.ipp 2010-05-12 08:34:45 EDT (Wed, 12 May 2010)
@@ -12,7 +12,26 @@
namespace boost_no_extern_template {
-extern template<class T> void f(T);
+template<class T, class U> void f(T const* p, U const* q)
+{
+ p = q;
+}
+
+template <class T>
+class must_not_compile
+{
+public:
+ void f(T const* p, int const* q);
+};
+
+template <class T>
+void must_not_compile<T>::f(T const* p, int const* q)
+{
+ p = q;
+}
+
+extern template void f<>(int const*, float const*);
+extern template class must_not_compile<int>;
int test()
{
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk