forked from boostorg/config
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:
@ -195,6 +195,7 @@
|
|||||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||||
|
#define BOOST_NO_CXX11_FINAL
|
||||||
|
|
||||||
#if __BORLANDC__ >= 0x590
|
#if __BORLANDC__ >= 0x590
|
||||||
# define BOOST_HAS_TR1_HASH
|
# define BOOST_HAS_TR1_HASH
|
||||||
|
@ -193,6 +193,10 @@
|
|||||||
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !__has_feature(cxx_override_control)
|
||||||
|
# define BOOST_NO_CXX11_FINAL
|
||||||
|
#endif
|
||||||
|
|
||||||
// Clang always supports variadic macros
|
// Clang always supports variadic macros
|
||||||
// Clang always supports extern templates
|
// Clang always supports extern templates
|
||||||
|
|
||||||
|
@ -121,6 +121,7 @@
|
|||||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||||
|
#define BOOST_NO_CXX11_FINAL
|
||||||
|
|
||||||
//
|
//
|
||||||
// TR1 macros:
|
// TR1 macros:
|
||||||
|
@ -105,6 +105,7 @@
|
|||||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||||
|
#define BOOST_NO_CXX11_FINAL
|
||||||
|
|
||||||
#ifdef c_plusplus
|
#ifdef c_plusplus
|
||||||
// EDG has "long long" in non-strict mode
|
// EDG has "long long" in non-strict mode
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
#define BOOST_NO_CXX11_CHAR32_T
|
#define BOOST_NO_CXX11_CHAR32_T
|
||||||
#define BOOST_NO_CXX11_CHAR16_T
|
#define BOOST_NO_CXX11_CHAR16_T
|
||||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||||
|
#define BOOST_NO_CXX11_FINAL
|
||||||
//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
||||||
#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
|
#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
|
||||||
//#define BOOST_HAS_FPCLASSIFY
|
//#define BOOST_HAS_FPCLASSIFY
|
||||||
|
@ -81,6 +81,7 @@
|
|||||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||||
|
#define BOOST_NO_CXX11_FINAL
|
||||||
|
|
||||||
#if (__DMC__ <= 0x840)
|
#if (__DMC__ <= 0x840)
|
||||||
#error "Compiler not supported or configured - please reconfigure"
|
#error "Compiler not supported or configured - please reconfigure"
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||||
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||||
# define BOOST_NO_CXX11_REF_QUALIFIERS
|
# define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||||
|
#define BOOST_NO_CXX11_FINAL
|
||||||
|
|
||||||
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
|
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
|
||||||
|
|
||||||
|
@ -269,6 +269,7 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
|
|||||||
# undef BOOST_NO_CXX11_RANGE_BASED_FOR
|
# undef BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||||
# undef BOOST_NO_CXX11_SCOPED_ENUMS
|
# undef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||||
# undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
# undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||||
|
# undef BOOST_NO_CXX11_FINAL
|
||||||
#endif
|
#endif
|
||||||
#if (BOOST_INTEL_CXX_VERSION >= 1310)
|
#if (BOOST_INTEL_CXX_VERSION >= 1310)
|
||||||
# undef BOOST_NO_SFINAE_EXPR
|
# undef BOOST_NO_SFINAE_EXPR
|
||||||
@ -320,6 +321,7 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
|
|||||||
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
||||||
# define BOOST_HAS_STDINT_H
|
# define BOOST_HAS_STDINT_H
|
||||||
|
# undef BOOST_NO_CXX11_FINAL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310)
|
#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310)
|
||||||
|
@ -124,6 +124,7 @@
|
|||||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||||
|
#define BOOST_NO_CXX11_FINAL
|
||||||
|
|
||||||
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
|
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
|
||||||
|
|
||||||
|
@ -73,6 +73,7 @@
|
|||||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||||
|
#define BOOST_NO_CXX11_FINAL
|
||||||
//
|
//
|
||||||
// versions check:
|
// versions check:
|
||||||
// we don't support MPW prior to version 8.9:
|
// we don't support MPW prior to version 8.9:
|
||||||
|
@ -81,4 +81,5 @@
|
|||||||
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||||
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||||
# define BOOST_NO_CXX11_REF_QUALIFIERS
|
# define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||||
|
# define BOOST_NO_CXX11_FINAL
|
||||||
#endif
|
#endif
|
||||||
|
@ -119,6 +119,7 @@
|
|||||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||||
|
#define BOOST_NO_CXX11_FINAL
|
||||||
|
|
||||||
//
|
//
|
||||||
// version check:
|
// version check:
|
||||||
|
@ -132,6 +132,7 @@
|
|||||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||||
|
#define BOOST_NO_CXX11_FINAL
|
||||||
|
|
||||||
//
|
//
|
||||||
// Version
|
// Version
|
||||||
|
@ -130,3 +130,4 @@
|
|||||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||||
|
#define BOOST_NO_CXX11_FINAL
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
#if _MSC_VER < 1600 // 150X == VC++ 9.0
|
#if _MSC_VER < 1600 // 150X == VC++ 9.0
|
||||||
// A bug in VC9:
|
// A bug in VC9:
|
||||||
# define BOOST_NO_ADL_BARRIER
|
# define BOOST_NO_ADL_BARRIER
|
||||||
|
# define BOOST_NO_CXX11_FINAL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,9 +14,28 @@ namespace boost_no_cxx11_final {
|
|||||||
|
|
||||||
struct X 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()
|
int test()
|
||||||
{
|
{
|
||||||
return 0;
|
derived d;
|
||||||
|
return check(&d);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user