From 08370c91581dbfa8ea301d28765c881e0682f68a Mon Sep 17 00:00:00 2001 From: Thomas Barbier Date: Tue, 1 Oct 2019 18:49:31 +0200 Subject: [PATCH] Fix c++17 warning redundant redeclaration of 'constexpr' static data member [-Werror=deprecated] --- include/boost/system/error_code.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/system/error_code.hpp b/include/boost/system/error_code.hpp index f0a151e..9fb7de3 100644 --- a/include/boost/system/error_code.hpp +++ b/include/boost/system/error_code.hpp @@ -335,8 +335,11 @@ template struct BOOST_SYMBOL_VISIBLE cat_holder static constexpr generic_error_category generic_category_instance{}; }; +// Before C++17 it was mandatory to redeclare all static constexpr +#if defined(BOOST_NO_CXX17_INLINE_VARIABLES) template constexpr system_error_category cat_holder::system_category_instance; template constexpr generic_error_category cat_holder::generic_category_instance; +#endif } // namespace detail