Tentative fix for BOOST_NO_EXTERN_TEMPLATE: previous test case was invalid.

[SVN r61930]
This commit is contained in:
John Maddock
2010-05-12 12:34:45 +00:00
parent 1995aad2de
commit e2f6dc9127
4 changed files with 24 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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()
{