Skip to content

Commit ffe4e0f

Browse files
authored
Merge pull request #329 from glenfe/develop
Implement BOOST_NO_CXX11_OVERRIDE and BOOST_OVERRIDE
2 parents b9eac83 + c6817bf commit ffe4e0f

29 files changed

Lines changed: 181 additions & 2 deletions

checks/Jamfile.v2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ obj cxx11_hdr_unordered_set : test_case.cpp : <define>TEST_BOOST_NO_CXX11_HDR_UN
9393
obj cxx11_inline_namespaces : test_case.cpp : <define>TEST_BOOST_NO_CXX11_INLINE_NAMESPACES ;
9494
obj cxx11_non_public_defaulted_functions : test_case.cpp : <define>TEST_BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS ;
9595
obj cxx11_numeric_limits : test_case.cpp : <define>TEST_BOOST_NO_CXX11_NUMERIC_LIMITS ;
96+
obj cxx11_override : test_case.cpp : <define>TEST_BOOST_NO_CXX11_OVERRIDE ;
9697
obj cxx11_pointer_traits : test_case.cpp : <define>TEST_BOOST_NO_CXX11_POINTER_TRAITS ;
9798
obj cxx11_ref_qualifiers : test_case.cpp : <define>TEST_BOOST_NO_CXX11_REF_QUALIFIERS ;
9899
obj cxx11_sfinae_expr : test_case.cpp : <define>TEST_BOOST_NO_CXX11_SFINAE_EXPR ;

checks/test_case.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,11 @@
421421
# error "Defect macro BOOST_NO_CXX11_NUMERIC_LIMITS is defined."
422422
# endif
423423
#endif
424+
#ifdef TEST_BOOST_NO_CXX11_OVERRIDE
425+
# ifdef BOOST_NO_CXX11_OVERRIDE
426+
# error "Defect macro BOOST_NO_CXX11_OVERRIDE is defined."
427+
# endif
428+
#endif
424429
#ifdef TEST_BOOST_NO_CXX11_POINTER_TRAITS
425430
# ifdef BOOST_NO_CXX11_POINTER_TRAITS
426431
# error "Defect macro BOOST_NO_CXX11_POINTER_TRAITS is defined."

doc/macro_reference.qbk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,8 @@ compilers implementing an early draft of the C++11 standard (in particular, inco
685685
[[`BOOST_NO_CXX11_NUMERIC_LIMITS`][The standard library `<limits>` header does
686686
not support the C++11 version of `numeric_limits`.
687687
]]
688+
[[`BOOST_NO_CXX11_OVERRIDE`][The compiler does not support `override`.
689+
]]
688690
[[`BOOST_NO_CXX11_POINTER_TRAITS`][The standard library does not provide a
689691
C++11 version of `std::pointer_traits` in <memory>.]]
690692
[[`BOOST_NO_CXX11_RANGE_BASED_FOR`][The compiler does not support
@@ -793,6 +795,10 @@ with:
793795
static BOOST_CONSTEXPR_OR_CONST UIntType xor_mask = a;
794796
``
795797
]]
798+
[[`BOOST_OVERRIDE`][
799+
If `BOOST_NO_CXX11_OVERRIDE` is not defined (i.e. C++11 compliant compilers),
800+
expands to `override` keyword, otherwise expands to nothing.
801+
]]
796802
[[`BOOST_STATIC_CONSTEXPR`][
797803
This is a shortcut for `static BOOST_CONSTEXPR_OR_CONST`. For example, when defining const expr variables replace:
798804
``

include/boost/config/compiler/borland.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@
198198
#define BOOST_NO_CXX11_INLINE_NAMESPACES
199199
#define BOOST_NO_CXX11_REF_QUALIFIERS
200200
#define BOOST_NO_CXX11_FINAL
201+
#define BOOST_NO_CXX11_OVERRIDE
201202
#define BOOST_NO_CXX11_THREAD_LOCAL
202203
#define BOOST_NO_CXX11_UNRESTRICTED_UNION
203204

include/boost/config/compiler/clang.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@
250250

251251
#if !__has_feature(cxx_override_control)
252252
# define BOOST_NO_CXX11_FINAL
253+
# define BOOST_NO_CXX11_OVERRIDE
253254
#endif
254255

255256
#if !__has_feature(cxx_unrestricted_unions)

include/boost/config/compiler/codegear.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@
251251
#define BOOST_NO_CXX11_INLINE_NAMESPACES
252252
#define BOOST_NO_CXX11_REF_QUALIFIERS
253253
#define BOOST_NO_CXX11_FINAL
254+
#define BOOST_NO_CXX11_OVERRIDE
254255
#define BOOST_NO_CXX11_THREAD_LOCAL
255256
#define BOOST_NO_CXX11_DECLTYPE_N3276
256257
#define BOOST_NO_CXX11_UNRESTRICTED_UNION

include/boost/config/compiler/common_edg.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
#define BOOST_NO_CXX11_INLINE_NAMESPACES
108108
#define BOOST_NO_CXX11_REF_QUALIFIERS
109109
#define BOOST_NO_CXX11_FINAL
110+
#define BOOST_NO_CXX11_OVERRIDE
110111
#define BOOST_NO_CXX11_THREAD_LOCAL
111112
#define BOOST_NO_CXX11_UNRESTRICTED_UNION
112113

include/boost/config/compiler/cray.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@
201201
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
202202
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
203203
#define BOOST_NO_CXX11_FINAL
204+
#define BOOST_NO_CXX11_OVERRIDE
204205
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
205206
#define BOOST_NO_CXX11_LAMBDAS
206207
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
@@ -275,6 +276,7 @@
275276
#undef BOOST_NO_CXX11_DELETED_FUNCTIONS
276277
#undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
277278
#undef BOOST_NO_CXX11_FINAL
279+
#undef BOOST_NO_CXX11_OVERRIDE
278280
#undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
279281
#undef BOOST_NO_CXX11_LAMBDAS
280282
#undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
@@ -346,6 +348,7 @@
346348
#undef BOOST_NO_CXX11_CHAR32_T
347349
#undef BOOST_NO_CXX11_INLINE_NAMESPACES
348350
#undef BOOST_NO_CXX11_FINAL
351+
#undef BOOST_NO_CXX11_OVERRIDE
349352
#undef BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
350353
#undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
351354
#define BOOST_NO_CXX11_SFINAE_EXPR // This is correct, even though '*_fail.cpp' test fails.

include/boost/config/compiler/digitalmars.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
#define BOOST_NO_CXX11_INLINE_NAMESPACES
8484
#define BOOST_NO_CXX11_REF_QUALIFIERS
8585
#define BOOST_NO_CXX11_FINAL
86+
#define BOOST_NO_CXX11_OVERRIDE
8687
#define BOOST_NO_CXX11_THREAD_LOCAL
8788
#define BOOST_NO_CXX11_UNRESTRICTED_UNION
8889

include/boost/config/compiler/gcc.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@
249249
# define BOOST_NO_CXX11_TEMPLATE_ALIASES
250250
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
251251
# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
252+
# define BOOST_NO_CXX11_OVERRIDE
252253
#endif
253254

254255
// C++0x features in 4.8.n and later

0 commit comments

Comments
 (0)