diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index 6c0cf00d..bd57de21 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -3250,6 +3250,20 @@ + +

+ BOOST_NO_CXX11_UNRESTRICTED_UNION +

+ + +

+ The compiler does not support an unrestricted union. This is a + union that may contain static data as well as user-defined member + data with non-trivial special member functions. +

+ + +

BOOST_NO_CXX11_USER_DEFINED_LITERALS @@ -3977,7 +3991,8 @@

- + +

BOOST_INLINE_VARIABLE @@ -3991,7 +4006,35 @@ for further adjustments to the code.

- + + + +

+ BOOST_IF_CONSTEXPR +

+ + +

+ Expands to if constexpr + when supported, or if + otherwise. +

+ + + + +

+ BOOST_INLINE_CONSTEXPR +

+ + +

+ This is a shortcut for BOOST_INLINE_VARIABLE + BOOST_CONSTEXPR_OR_CONST. +

+ + +
diff --git a/doc/html/boost_config/guidelines_for_boost_authors.html b/doc/html/boost_config/guidelines_for_boost_authors.html index f57e583e..b61ee694 100644 --- a/doc/html/boost_config/guidelines_for_boost_authors.html +++ b/doc/html/boost_config/guidelines_for_boost_authors.html @@ -297,9 +297,9 @@ and name the test file "boost_has_foo.ipp". Try not to add feature test macros unnecessarily, if there is a platform specific macro that can already be used (for example _WIN32, - __BEOS__, or __linux) to identify the feature then use - that. Try to keep the macro to a feature group, or header name, rather than - one specific API (for example BOOST_HAS_NL_TYPES_H + __BEOS__, or __linux__) to identify the feature then + use that. Try to keep the macro to a feature group, or header name, rather + than one specific API (for example BOOST_HAS_NL_TYPES_H rather than BOOST_HAS_CATOPEN). If the macro describes a POSIX feature group, then add boilerplate code to <boost/config/detail/suffix.hpp> diff --git a/doc/html/index.html b/doc/html/index.html index 88c3b169..27d9289b 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -990,7 +990,7 @@
- +

Last revised: October 29, 2019 at 16:54:06 GMT

Last revised: March 23, 2020 at 21:06:56 GMT


diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index e37efac1..394d5d04 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -1406,6 +1406,11 @@ library in use. Mainly for debugging the configuration. Defined as a string describing the name of the platform. Mainly for debugging the configuration. ]] +[[`BOOST_LIBSTDCXX_VERSION`][``][ +Defined if the libstdc++ standard library is in use. +Has the value of normalised 5 digit integer of the form VVMMM where +VV is the major version number, MM is the minor version number. +]] ] [endsect] diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index 1ea6faa7..6a1e251f 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -461,7 +461,7 @@ BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the c #elif defined(BOOST_AUTO_LINK_TAGGED) # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) +# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # endif #elif defined(BOOST_AUTO_LINK_SYSTEM) # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 78f1ae39..d6fbda0e 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -254,7 +254,6 @@ // C++0x features in 4.8.n and later // #if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_ALIGNAS # define BOOST_NO_CXX11_THREAD_LOCAL # define BOOST_NO_CXX11_SFINAE_EXPR #endif @@ -267,6 +266,14 @@ # define BOOST_NO_CXX14_BINARY_LITERALS #endif +// C++0x features in 4.9.n and later +// +#if (BOOST_GCC_VERSION < 40900) || !defined(BOOST_GCC_CXX11) +// Although alignas support is added in gcc 4.8, it does not accept +// constant expressions as an argument until gcc 4.9. +# define BOOST_NO_CXX11_ALIGNAS +#endif + // C++0x features in 5.1 and later // #if (BOOST_GCC_VERSION < 50100) || !defined(BOOST_GCC_CXX11) diff --git a/test/boost_no_cxx11_alignas.ipp b/test/boost_no_cxx11_alignas.ipp index afd428f6..53342215 100644 --- a/test/boost_no_cxx11_alignas.ipp +++ b/test/boost_no_cxx11_alignas.ipp @@ -1,4 +1,4 @@ -// (C) Copyright Andrey Semashev 2013 +// (C) Copyright Andrey Semashev 2013, 2020 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file @@ -12,6 +12,12 @@ namespace boost_no_cxx11_alignas { +template< unsigned int Alignment > +struct alignment +{ + static const unsigned int value = Alignment; +}; + struct alignas(16) my_data1 { char data[10]; @@ -22,10 +28,17 @@ struct alignas(double) my_data2 char data[16]; }; +struct alignas(alignment< 16u >::value) my_data3 +{ + char data[16]; +}; + my_data1 dummy1[2]; my_data2 dummy2; -alignas(16) char dummy3[10]; -alignas(double) char dummy4[32]; +my_data3 dummy3; +alignas(16) char dummy4[10]; +alignas(double) char dummy5[32]; +alignas(alignment< 16u >::value) char dummy6[32]; int test() {