Added BOOST_INLINE_VARIABLE macro.

The BOOST_INLINE_VARIABLE macro can be used to mark C++17 inline variables in
contexts where omitting the inline keyword is still acceptable on older
compilers.

This commit also adds the missing docs for BOOST_NO_CXX17_INLINE_VARIABLES.
This commit is contained in:
Andrey Semashev
2019-10-02 17:20:08 +03:00
parent cda275e884
commit 38df8ca0d7
2 changed files with 25 additions and 1 deletions
+9
View File
@@ -986,6 +986,15 @@ namespace std{ using ::type_info; }
#define BOOST_CXX14_CONSTEXPR constexpr
#endif
//
// C++17 inline variables
//
#if !defined(BOOST_NO_CXX17_INLINE_VARIABLES)
#define BOOST_INLINE_VARIABLE inline
#else
#define BOOST_INLINE_VARIABLE
#endif
//
// Unused variable/typedef workarounds:
//