mirror of
https://github.com/boostorg/config.git
synced 2025-05-11 21:23:56 +00:00
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:
parent
a49bdd43c0
commit
2d297754ad
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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__
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user