Set BOOST_NO_CXX11_FINAL for all obsolete compilers, or for those we can't test locally.

Improve tests for BOOST_NO_CXX11_FINAL.
This commit is contained in:
jzmaddock 2014-08-19 18:34:09 +01:00
parent a49bdd43c0
commit 2d297754ad
16 changed files with 39 additions and 1 deletions

View File

@ -195,6 +195,7 @@
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
#if __BORLANDC__ >= 0x590
# define BOOST_HAS_TR1_HASH

View File

@ -193,6 +193,10 @@
# define BOOST_NO_CXX11_INLINE_NAMESPACES
#endif
#if !__has_feature(cxx_override_control)
# define BOOST_NO_CXX11_FINAL
#endif
// Clang always supports variadic macros
// Clang always supports extern templates

View File

@ -121,6 +121,7 @@
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
//
// TR1 macros:

View File

@ -105,6 +105,7 @@
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
#ifdef c_plusplus
// EDG has "long long" in non-strict mode

View File

@ -59,6 +59,7 @@
#define BOOST_NO_CXX11_CHAR32_T
#define BOOST_NO_CXX11_CHAR16_T
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
//#define BOOST_HAS_FPCLASSIFY

View File

@ -81,6 +81,7 @@
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
#if (__DMC__ <= 0x840)
#error "Compiler not supported or configured - please reconfigure"

View File

@ -59,6 +59,7 @@
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
# define BOOST_NO_CXX11_INLINE_NAMESPACES
# define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__

View File

@ -269,6 +269,7 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
# undef BOOST_NO_CXX11_RANGE_BASED_FOR
# undef BOOST_NO_CXX11_SCOPED_ENUMS
# undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
# undef BOOST_NO_CXX11_FINAL
#endif
#if (BOOST_INTEL_CXX_VERSION >= 1310)
# undef BOOST_NO_SFINAE_EXPR
@ -320,6 +321,7 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
# define BOOST_HAS_STDINT_H
# undef BOOST_NO_CXX11_FINAL
#endif
#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310)

View File

@ -124,6 +124,7 @@
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)

View File

@ -73,6 +73,7 @@
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
//
// versions check:
// we don't support MPW prior to version 8.9:

View File

@ -81,4 +81,5 @@
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
# define BOOST_NO_CXX11_INLINE_NAMESPACES
# define BOOST_NO_CXX11_REF_QUALIFIERS
# define BOOST_NO_CXX11_FINAL
#endif

View File

@ -119,6 +119,7 @@
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
//
// version check:

View File

@ -132,6 +132,7 @@
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
//
// Version

View File

@ -130,3 +130,4 @@
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL

View File

@ -64,6 +64,7 @@
#if _MSC_VER < 1600 // 150X == VC++ 9.0
// A bug in VC9:
# define BOOST_NO_ADL_BARRIER
# define BOOST_NO_CXX11_FINAL
#endif

View File

@ -14,9 +14,28 @@ namespace boost_no_cxx11_final {
struct X final {};
struct abstract
{
virtual int f() = 0;
};
struct derived : public abstract
{
virtual int f() final
{
return 0;
}
};
int check(abstract* pa)
{
return pa->f();
}
int test()
{
return 0;
derived d;
return check(&d);
}
}