From 14185d614f3fac1f873fe6775d30897c0da707fd Mon Sep 17 00:00:00 2001 From: denzor200 Date: Sun, 20 Jun 2021 16:32:07 +0400 Subject: [PATCH 1/8] Implemented BOOST_NO_PFR macro --- include/boost/pfr/config.hpp | 16 ++++ include/boost/pfr/detail/config.hpp | 87 +++--------------- include/boost/pfr/detail/config_safe.hpp | 110 +++++++++++++++++++++++ 3 files changed, 136 insertions(+), 77 deletions(-) create mode 100644 include/boost/pfr/config.hpp create mode 100644 include/boost/pfr/detail/config_safe.hpp diff --git a/include/boost/pfr/config.hpp b/include/boost/pfr/config.hpp new file mode 100644 index 0000000..33bab57 --- /dev/null +++ b/include/boost/pfr/config.hpp @@ -0,0 +1,16 @@ +// Copyright (c) 2021 Denis Mikhailov +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_PFR_CONFIG_HPP +#define BOOST_PFR_CONFIG_HPP +#pragma once + +#include + +#if BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON != BOOST_PFR_LACK_OF_SUPPORTS_REASON_ALL_RIGHT +#define BOOST_NO_PFR +#endif + +#endif //BOOST_PFR_CONFIG_HPP diff --git a/include/boost/pfr/detail/config.hpp b/include/boost/pfr/detail/config.hpp index ad00f0e..83f7b15 100644 --- a/include/boost/pfr/detail/config.hpp +++ b/include/boost/pfr/detail/config.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 Antony Polukhin +// Copyright (c) 2021 Denis Mikhailov // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -7,85 +7,18 @@ #define BOOST_PFR_DETAIL_CONFIG_HPP #pragma once -#include // to get non standard platform macro definitions (__GLIBCXX__ for example) +#include -// Reminder: -// * MSVC++ 14.2 _MSC_VER == 1927 <- Loophole is known to work (Visual Studio ????) -// * MSVC++ 14.1 _MSC_VER == 1916 <- Loophole is known to NOT work (Visual Studio 2017) -// * MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) -// * MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) - -#if defined(_MSC_VER) -# if !defined(_MSVC_LANG) || _MSC_VER <= 1900 -# error Boost.PFR library requires more modern MSVC compiler. -# endif -#elif __cplusplus < 201402L -# error Boost.PFR library requires at least C++14. -#endif - -#ifndef BOOST_PFR_USE_LOOPHOLE -# if defined(_MSC_VER) -# if _MSC_VER >= 1927 -# define BOOST_PFR_USE_LOOPHOLE 1 -# else -# define BOOST_PFR_USE_LOOPHOLE 0 -# endif -# elif defined(__clang_major__) && __clang_major__ >= 8 -# define BOOST_PFR_USE_LOOPHOLE 0 +#if BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON != BOOST_PFR_LACK_OF_SUPPORTS_REASON_ALL_RIGHT +# if BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON == BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_MORE_MODERN_MSVC_COMPILER +# error Boost.PFR library requires more modern MSVC compiler. +# elif BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON == BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_AT_LEAST_CPP14 +# error Boost.PFR library requires at least C++14. +# elif BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON == BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_STDCPPLATEST_OR_STDCPP17_FLAGS_ON_YOUR_COMPILER +# error Boost.PFR library requires /std:c++latest or /std:c++17 flags on your compiler. # else -# define BOOST_PFR_USE_LOOPHOLE 1 +# error Boost.PFR library unsupported. # endif #endif -#ifndef BOOST_PFR_USE_CPP17 -# ifdef __cpp_structured_bindings -# define BOOST_PFR_USE_CPP17 1 -# elif defined(_MSVC_LANG) -# if _MSVC_LANG >= 201703L -# define BOOST_PFR_USE_CPP17 1 -# else -# define BOOST_PFR_USE_CPP17 0 -# endif -# else -# define BOOST_PFR_USE_CPP17 0 -# endif -#endif - -#if (!BOOST_PFR_USE_CPP17 && !BOOST_PFR_USE_LOOPHOLE) -# if (defined(_MSC_VER) && _MSC_VER < 1916) ///< in Visual Studio 2017 v15.9 PFR library with classic engine normally works -# error Boost.PFR requires /std:c++latest or /std:c++17 flags on your compiler. -# endif -#endif - -#ifndef BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE -// Assume that libstdc++ since GCC-7.3 does not have linear instantiation depth in std::make_integral_sequence -# if defined( __GLIBCXX__) && __GLIBCXX__ >= 20180101 -# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 -# elif defined(_MSC_VER) -# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 -//# elif other known working lib -# else -# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 0 -# endif -#endif - -#ifndef BOOST_PFR_HAS_GUARANTEED_COPY_ELISION -# if defined(__cpp_guaranteed_copy_elision) && (!defined(_MSC_VER) || _MSC_VER > 1928) -# define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 1 -# else -# define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 0 -# endif -#endif - -#if defined(__has_cpp_attribute) -# if __has_cpp_attribute(maybe_unused) -# define BOOST_PFR_MAYBE_UNUSED [[maybe_unused]] -# endif -#endif - -#ifndef BOOST_PFR_MAYBE_UNUSED -# define BOOST_PFR_MAYBE_UNUSED -#endif - - #endif // BOOST_PFR_DETAIL_CONFIG_HPP diff --git a/include/boost/pfr/detail/config_safe.hpp b/include/boost/pfr/detail/config_safe.hpp new file mode 100644 index 0000000..e8dd725 --- /dev/null +++ b/include/boost/pfr/detail/config_safe.hpp @@ -0,0 +1,110 @@ +// Copyright (c) 2016-2021 Antony Polukhin +// Copyright (c) 2021 Denis Mikhailov +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_PFR_DETAIL_CONFIG_SAFE_HPP +#define BOOST_PFR_DETAIL_CONFIG_SAFE_HPP +#pragma once + +#include // to get non standard platform macro definitions (__GLIBCXX__ for example) + +#define BOOST_PFR_LACK_OF_SUPPORTS_REASON_ALL_RIGHT 0 +#define BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_MORE_MODERN_MSVC_COMPILER 1 +#define BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_AT_LEAST_CPP14 2 +#define BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_STDCPPLATEST_OR_STDCPP17_FLAGS_ON_YOUR_COMPILER 3 + + + + +#ifdef BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON +# error Boost.PFR it is forbidden to set a service value of the macro BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON in the user's side code +#endif + + +// Reminder: +// * MSVC++ 14.2 _MSC_VER == 1927 <- Loophole is known to work (Visual Studio ????) +// * MSVC++ 14.1 _MSC_VER == 1916 <- Loophole is known to NOT work (Visual Studio 2017) +// * MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) +// * MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) + +#if defined(_MSC_VER) +# if !defined(_MSVC_LANG) || _MSC_VER <= 1900 +# define BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_MORE_MODERN_MSVC_COMPILER +# endif +#elif __cplusplus < 201402L +# define BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_AT_LEAST_CPP14 +#endif + +#ifndef BOOST_PFR_USE_LOOPHOLE +# if defined(_MSC_VER) +# if _MSC_VER >= 1927 +# define BOOST_PFR_USE_LOOPHOLE 1 +# else +# define BOOST_PFR_USE_LOOPHOLE 0 +# endif +# elif defined(__clang_major__) && __clang_major__ >= 8 +# define BOOST_PFR_USE_LOOPHOLE 0 +# else +# define BOOST_PFR_USE_LOOPHOLE 1 +# endif +#endif + +#ifndef BOOST_PFR_USE_CPP17 +# ifdef __cpp_structured_bindings +# define BOOST_PFR_USE_CPP17 1 +# elif defined(_MSVC_LANG) +# if _MSVC_LANG >= 201703L +# define BOOST_PFR_USE_CPP17 1 +# else +# define BOOST_PFR_USE_CPP17 0 +# endif +# else +# define BOOST_PFR_USE_CPP17 0 +# endif +#endif + +#if (!BOOST_PFR_USE_CPP17 && !BOOST_PFR_USE_LOOPHOLE) +# if (defined(_MSC_VER) && _MSC_VER < 1916) ///< in Visual Studio 2017 v15.9 PFR library with classic engine normally works +# ifndef BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON +# define BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_STDCPPLATEST_OR_STDCPP17_FLAGS_ON_YOUR_COMPILER +# endif +# endif +#endif + +#ifndef BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE +// Assume that libstdc++ since GCC-7.3 does not have linear instantiation depth in std::make_integral_sequence +# if defined( __GLIBCXX__) && __GLIBCXX__ >= 20180101 +# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 +# elif defined(_MSC_VER) +# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 +//# elif other known working lib +# else +# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 0 +# endif +#endif + +#ifndef BOOST_PFR_HAS_GUARANTEED_COPY_ELISION +# if defined(__cpp_guaranteed_copy_elision) && (!defined(_MSC_VER) || _MSC_VER > 1928) +# define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 1 +# else +# define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 0 +# endif +#endif + +#if defined(__has_cpp_attribute) +# if __has_cpp_attribute(maybe_unused) +# define BOOST_PFR_MAYBE_UNUSED [[maybe_unused]] +# endif +#endif + +#ifndef BOOST_PFR_MAYBE_UNUSED +# define BOOST_PFR_MAYBE_UNUSED +#endif + +#ifndef BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON +#define BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON BOOST_PFR_LACK_OF_SUPPORTS_REASON_ALL_RIGHT +#endif + +#endif //BOOST_PFR_DETAIL_CONFIG_SAFE_HPP From 5374f9aebc6d573f7f0362c9bb3352cfb8cb94fc Mon Sep 17 00:00:00 2001 From: Denis Mikhaylov Date: Thu, 1 Dec 2022 19:47:29 +0600 Subject: [PATCH 2/8] Revert "Implemented BOOST_NO_PFR macro" This reverts commit 14185d614f3fac1f873fe6775d30897c0da707fd. --- include/boost/pfr/config.hpp | 16 ---- include/boost/pfr/detail/config.hpp | 87 +++++++++++++++--- include/boost/pfr/detail/config_safe.hpp | 110 ----------------------- 3 files changed, 77 insertions(+), 136 deletions(-) delete mode 100644 include/boost/pfr/config.hpp delete mode 100644 include/boost/pfr/detail/config_safe.hpp diff --git a/include/boost/pfr/config.hpp b/include/boost/pfr/config.hpp deleted file mode 100644 index 33bab57..0000000 --- a/include/boost/pfr/config.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2021 Denis Mikhailov -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PFR_CONFIG_HPP -#define BOOST_PFR_CONFIG_HPP -#pragma once - -#include - -#if BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON != BOOST_PFR_LACK_OF_SUPPORTS_REASON_ALL_RIGHT -#define BOOST_NO_PFR -#endif - -#endif //BOOST_PFR_CONFIG_HPP diff --git a/include/boost/pfr/detail/config.hpp b/include/boost/pfr/detail/config.hpp index 83f7b15..ad00f0e 100644 --- a/include/boost/pfr/detail/config.hpp +++ b/include/boost/pfr/detail/config.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Denis Mikhailov +// Copyright (c) 2016-2021 Antony Polukhin // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -7,18 +7,85 @@ #define BOOST_PFR_DETAIL_CONFIG_HPP #pragma once -#include +#include // to get non standard platform macro definitions (__GLIBCXX__ for example) -#if BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON != BOOST_PFR_LACK_OF_SUPPORTS_REASON_ALL_RIGHT -# if BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON == BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_MORE_MODERN_MSVC_COMPILER -# error Boost.PFR library requires more modern MSVC compiler. -# elif BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON == BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_AT_LEAST_CPP14 -# error Boost.PFR library requires at least C++14. -# elif BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON == BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_STDCPPLATEST_OR_STDCPP17_FLAGS_ON_YOUR_COMPILER -# error Boost.PFR library requires /std:c++latest or /std:c++17 flags on your compiler. +// Reminder: +// * MSVC++ 14.2 _MSC_VER == 1927 <- Loophole is known to work (Visual Studio ????) +// * MSVC++ 14.1 _MSC_VER == 1916 <- Loophole is known to NOT work (Visual Studio 2017) +// * MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) +// * MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) + +#if defined(_MSC_VER) +# if !defined(_MSVC_LANG) || _MSC_VER <= 1900 +# error Boost.PFR library requires more modern MSVC compiler. +# endif +#elif __cplusplus < 201402L +# error Boost.PFR library requires at least C++14. +#endif + +#ifndef BOOST_PFR_USE_LOOPHOLE +# if defined(_MSC_VER) +# if _MSC_VER >= 1927 +# define BOOST_PFR_USE_LOOPHOLE 1 +# else +# define BOOST_PFR_USE_LOOPHOLE 0 +# endif +# elif defined(__clang_major__) && __clang_major__ >= 8 +# define BOOST_PFR_USE_LOOPHOLE 0 # else -# error Boost.PFR library unsupported. +# define BOOST_PFR_USE_LOOPHOLE 1 # endif #endif +#ifndef BOOST_PFR_USE_CPP17 +# ifdef __cpp_structured_bindings +# define BOOST_PFR_USE_CPP17 1 +# elif defined(_MSVC_LANG) +# if _MSVC_LANG >= 201703L +# define BOOST_PFR_USE_CPP17 1 +# else +# define BOOST_PFR_USE_CPP17 0 +# endif +# else +# define BOOST_PFR_USE_CPP17 0 +# endif +#endif + +#if (!BOOST_PFR_USE_CPP17 && !BOOST_PFR_USE_LOOPHOLE) +# if (defined(_MSC_VER) && _MSC_VER < 1916) ///< in Visual Studio 2017 v15.9 PFR library with classic engine normally works +# error Boost.PFR requires /std:c++latest or /std:c++17 flags on your compiler. +# endif +#endif + +#ifndef BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE +// Assume that libstdc++ since GCC-7.3 does not have linear instantiation depth in std::make_integral_sequence +# if defined( __GLIBCXX__) && __GLIBCXX__ >= 20180101 +# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 +# elif defined(_MSC_VER) +# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 +//# elif other known working lib +# else +# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 0 +# endif +#endif + +#ifndef BOOST_PFR_HAS_GUARANTEED_COPY_ELISION +# if defined(__cpp_guaranteed_copy_elision) && (!defined(_MSC_VER) || _MSC_VER > 1928) +# define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 1 +# else +# define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 0 +# endif +#endif + +#if defined(__has_cpp_attribute) +# if __has_cpp_attribute(maybe_unused) +# define BOOST_PFR_MAYBE_UNUSED [[maybe_unused]] +# endif +#endif + +#ifndef BOOST_PFR_MAYBE_UNUSED +# define BOOST_PFR_MAYBE_UNUSED +#endif + + #endif // BOOST_PFR_DETAIL_CONFIG_HPP diff --git a/include/boost/pfr/detail/config_safe.hpp b/include/boost/pfr/detail/config_safe.hpp deleted file mode 100644 index e8dd725..0000000 --- a/include/boost/pfr/detail/config_safe.hpp +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2016-2021 Antony Polukhin -// Copyright (c) 2021 Denis Mikhailov -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PFR_DETAIL_CONFIG_SAFE_HPP -#define BOOST_PFR_DETAIL_CONFIG_SAFE_HPP -#pragma once - -#include // to get non standard platform macro definitions (__GLIBCXX__ for example) - -#define BOOST_PFR_LACK_OF_SUPPORTS_REASON_ALL_RIGHT 0 -#define BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_MORE_MODERN_MSVC_COMPILER 1 -#define BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_AT_LEAST_CPP14 2 -#define BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_STDCPPLATEST_OR_STDCPP17_FLAGS_ON_YOUR_COMPILER 3 - - - - -#ifdef BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON -# error Boost.PFR it is forbidden to set a service value of the macro BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON in the user's side code -#endif - - -// Reminder: -// * MSVC++ 14.2 _MSC_VER == 1927 <- Loophole is known to work (Visual Studio ????) -// * MSVC++ 14.1 _MSC_VER == 1916 <- Loophole is known to NOT work (Visual Studio 2017) -// * MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) -// * MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) - -#if defined(_MSC_VER) -# if !defined(_MSVC_LANG) || _MSC_VER <= 1900 -# define BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_MORE_MODERN_MSVC_COMPILER -# endif -#elif __cplusplus < 201402L -# define BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_AT_LEAST_CPP14 -#endif - -#ifndef BOOST_PFR_USE_LOOPHOLE -# if defined(_MSC_VER) -# if _MSC_VER >= 1927 -# define BOOST_PFR_USE_LOOPHOLE 1 -# else -# define BOOST_PFR_USE_LOOPHOLE 0 -# endif -# elif defined(__clang_major__) && __clang_major__ >= 8 -# define BOOST_PFR_USE_LOOPHOLE 0 -# else -# define BOOST_PFR_USE_LOOPHOLE 1 -# endif -#endif - -#ifndef BOOST_PFR_USE_CPP17 -# ifdef __cpp_structured_bindings -# define BOOST_PFR_USE_CPP17 1 -# elif defined(_MSVC_LANG) -# if _MSVC_LANG >= 201703L -# define BOOST_PFR_USE_CPP17 1 -# else -# define BOOST_PFR_USE_CPP17 0 -# endif -# else -# define BOOST_PFR_USE_CPP17 0 -# endif -#endif - -#if (!BOOST_PFR_USE_CPP17 && !BOOST_PFR_USE_LOOPHOLE) -# if (defined(_MSC_VER) && _MSC_VER < 1916) ///< in Visual Studio 2017 v15.9 PFR library with classic engine normally works -# ifndef BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON -# define BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON BOOST_PFR_LACK_OF_SUPPORTS_REASON_REQUIRES_STDCPPLATEST_OR_STDCPP17_FLAGS_ON_YOUR_COMPILER -# endif -# endif -#endif - -#ifndef BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE -// Assume that libstdc++ since GCC-7.3 does not have linear instantiation depth in std::make_integral_sequence -# if defined( __GLIBCXX__) && __GLIBCXX__ >= 20180101 -# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 -# elif defined(_MSC_VER) -# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 -//# elif other known working lib -# else -# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 0 -# endif -#endif - -#ifndef BOOST_PFR_HAS_GUARANTEED_COPY_ELISION -# if defined(__cpp_guaranteed_copy_elision) && (!defined(_MSC_VER) || _MSC_VER > 1928) -# define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 1 -# else -# define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 0 -# endif -#endif - -#if defined(__has_cpp_attribute) -# if __has_cpp_attribute(maybe_unused) -# define BOOST_PFR_MAYBE_UNUSED [[maybe_unused]] -# endif -#endif - -#ifndef BOOST_PFR_MAYBE_UNUSED -# define BOOST_PFR_MAYBE_UNUSED -#endif - -#ifndef BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON -#define BOOST_PFR_CUR_LACK_OF_SUPPORTS_REASON BOOST_PFR_LACK_OF_SUPPORTS_REASON_ALL_RIGHT -#endif - -#endif //BOOST_PFR_DETAIL_CONFIG_SAFE_HPP From ff6c2b87c09377f2c2b72e5784ea2665e66772f6 Mon Sep 17 00:00:00 2001 From: Denis Mikhaylov Date: Thu, 1 Dec 2022 20:43:36 +0600 Subject: [PATCH 3/8] Remake BOOST_NO_PFR, now it can be overridden by the user --- include/boost/pfr.hpp | 1 + include/boost/pfr/config.hpp | 104 ++++++++++++++++++++++++++++ include/boost/pfr/detail/config.hpp | 89 +++--------------------- 3 files changed, 116 insertions(+), 78 deletions(-) create mode 100644 include/boost/pfr/config.hpp diff --git a/include/boost/pfr.hpp b/include/boost/pfr.hpp index 32ff067..600b2fb 100644 --- a/include/boost/pfr.hpp +++ b/include/boost/pfr.hpp @@ -9,6 +9,7 @@ /// \file boost/pfr.hpp /// Includes all the Boost.PFR headers +#include #include #include #include diff --git a/include/boost/pfr/config.hpp b/include/boost/pfr/config.hpp new file mode 100644 index 0000000..e7fc081 --- /dev/null +++ b/include/boost/pfr/config.hpp @@ -0,0 +1,104 @@ +// Copyright (c) 2016-2022 Antony Polukhin +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_PFR_CONFIG_HPP +#define BOOST_PFR_CONFIG_HPP +#pragma once + +#include // to get non standard platform macro definitions (__GLIBCXX__ for example) + +// Reminder: +// * MSVC++ 14.2 _MSC_VER == 1927 <- Loophole is known to work (Visual Studio ????) +// * MSVC++ 14.1 _MSC_VER == 1916 <- Loophole is known to NOT work (Visual Studio 2017) +// * MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) +// * MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) + +#ifdef BOOST_PFR_NOT_SUPPORTED +# error Please, don't set BOOST_PFR_NOT_SUPPORTED value manually, use '-DBOOST_NO_PFR=1' instead of it +#endif + +#if defined(_MSC_VER) +# if !defined(_MSVC_LANG) || _MSC_VER <= 1900 +# define BOOST_PFR_NOT_SUPPORTED 1 +# endif +#elif __cplusplus < 201402L +# define BOOST_PFR_NOT_SUPPORTED 1 +#endif + +#ifndef BOOST_PFR_USE_LOOPHOLE +# if defined(_MSC_VER) +# if _MSC_VER >= 1927 +# define BOOST_PFR_USE_LOOPHOLE 1 +# else +# define BOOST_PFR_USE_LOOPHOLE 0 +# endif +# elif defined(__clang_major__) && __clang_major__ >= 8 +# define BOOST_PFR_USE_LOOPHOLE 0 +# else +# define BOOST_PFR_USE_LOOPHOLE 1 +# endif +#endif + +#ifndef BOOST_PFR_USE_CPP17 +# ifdef __cpp_structured_bindings +# define BOOST_PFR_USE_CPP17 1 +# elif defined(_MSVC_LANG) +# if _MSVC_LANG >= 201703L +# define BOOST_PFR_USE_CPP17 1 +# else +# define BOOST_PFR_USE_CPP17 0 +# endif +# else +# define BOOST_PFR_USE_CPP17 0 +# endif +#endif + +#if (!BOOST_PFR_USE_CPP17 && !BOOST_PFR_USE_LOOPHOLE) +# if (defined(_MSC_VER) && _MSC_VER < 1916) ///< in Visual Studio 2017 v15.9 PFR library with classic engine normally works +# define BOOST_PFR_NOT_SUPPORTED 1 +# endif +#endif + +#ifndef BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE +// Assume that libstdc++ since GCC-7.3 does not have linear instantiation depth in std::make_integral_sequence +# if defined( __GLIBCXX__) && __GLIBCXX__ >= 20180101 +# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 +# elif defined(_MSC_VER) +# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 +//# elif other known working lib +# else +# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 0 +# endif +#endif + +#ifndef BOOST_PFR_HAS_GUARANTEED_COPY_ELISION +# if defined(__cpp_guaranteed_copy_elision) && (!defined(_MSC_VER) || _MSC_VER > 1928) +# define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 1 +# else +# define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 0 +# endif +#endif + +#if defined(__has_cpp_attribute) +# if __has_cpp_attribute(maybe_unused) +# define BOOST_PFR_MAYBE_UNUSED [[maybe_unused]] +# endif +#endif + +#ifndef BOOST_PFR_MAYBE_UNUSED +# define BOOST_PFR_MAYBE_UNUSED +#endif + +#ifndef BOOST_NO_PFR +# ifdef BOOST_PFR_NOT_SUPPORTED +# define BOOST_NO_PFR 1 +# else +# define BOOST_NO_PFR 0 +# endif +#endif + +#undef BOOST_PFR_NOT_SUPPORTED + +#endif // BOOST_PFR_CONFIG_HPP diff --git a/include/boost/pfr/detail/config.hpp b/include/boost/pfr/detail/config.hpp index 8a1ac7d..3252041 100644 --- a/include/boost/pfr/detail/config.hpp +++ b/include/boost/pfr/detail/config.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022 Antony Polukhin +// Copyright (c) 2022 Denis Mikhailov // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -7,85 +7,18 @@ #define BOOST_PFR_DETAIL_CONFIG_HPP #pragma once -#include // to get non standard platform macro definitions (__GLIBCXX__ for example) +#include -// Reminder: -// * MSVC++ 14.2 _MSC_VER == 1927 <- Loophole is known to work (Visual Studio ????) -// * MSVC++ 14.1 _MSC_VER == 1916 <- Loophole is known to NOT work (Visual Studio 2017) -// * MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) -// * MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) +#if BOOST_NO_PFR -#if defined(_MSC_VER) -# if !defined(_MSVC_LANG) || _MSC_VER <= 1900 -# error Boost.PFR library requires more modern MSVC compiler. -# endif -#elif __cplusplus < 201402L -# error Boost.PFR library requires at least C++14. -#endif - -#ifndef BOOST_PFR_USE_LOOPHOLE -# if defined(_MSC_VER) -# if _MSC_VER >= 1927 -# define BOOST_PFR_USE_LOOPHOLE 1 -# else -# define BOOST_PFR_USE_LOOPHOLE 0 -# endif -# elif defined(__clang_major__) && __clang_major__ >= 8 -# define BOOST_PFR_USE_LOOPHOLE 0 -# else -# define BOOST_PFR_USE_LOOPHOLE 1 -# endif -#endif - -#ifndef BOOST_PFR_USE_CPP17 -# ifdef __cpp_structured_bindings -# define BOOST_PFR_USE_CPP17 1 -# elif defined(_MSVC_LANG) -# if _MSVC_LANG >= 201703L -# define BOOST_PFR_USE_CPP17 1 -# else -# define BOOST_PFR_USE_CPP17 0 -# endif -# else -# define BOOST_PFR_USE_CPP17 0 -# endif -#endif - -#if (!BOOST_PFR_USE_CPP17 && !BOOST_PFR_USE_LOOPHOLE) -# if (defined(_MSC_VER) && _MSC_VER < 1916) ///< in Visual Studio 2017 v15.9 PFR library with classic engine normally works -# error Boost.PFR requires /std:c++latest or /std:c++17 flags on your compiler. -# endif -#endif - -#ifndef BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE -// Assume that libstdc++ since GCC-7.3 does not have linear instantiation depth in std::make_integral_sequence -# if defined( __GLIBCXX__) && __GLIBCXX__ >= 20180101 -# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 -# elif defined(_MSC_VER) -# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 -//# elif other known working lib -# else -# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 0 -# endif -#endif - -#ifndef BOOST_PFR_HAS_GUARANTEED_COPY_ELISION -# if defined(__cpp_guaranteed_copy_elision) && (!defined(_MSC_VER) || _MSC_VER > 1928) -# define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 1 -# else -# define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 0 -# endif -#endif - -#if defined(__has_cpp_attribute) -# if __has_cpp_attribute(maybe_unused) -# define BOOST_PFR_MAYBE_UNUSED [[maybe_unused]] -# endif -#endif - -#ifndef BOOST_PFR_MAYBE_UNUSED -# define BOOST_PFR_MAYBE_UNUSED -#endif +#error Boost.PFR library is not supported in your environment. \ + Try one of the possible solutions: \ + 1. enable C++14; \ + 2. enable C++17; \ + 3. update your compiler; \ + or disable this error by '-DBOOST_NO_PFR=0' if you know what you do. +#endif // BOOST_NO_PFR #endif // BOOST_PFR_DETAIL_CONFIG_HPP + From 69a06b98da26de811aa504ab1f433df2ec1f0e81 Mon Sep 17 00:00:00 2001 From: denzor200 Date: Sat, 17 Dec 2022 00:33:44 +0400 Subject: [PATCH 4/8] review discussions --- doc/pfr.qbk | 1 + include/boost/pfr/config.hpp | 1 + include/boost/pfr/detail/config.hpp | 10 ++++++---- test/print_config.cpp | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/pfr.qbk b/doc/pfr.qbk index e1bceef..ce339ab 100644 --- a/doc/pfr.qbk +++ b/doc/pfr.qbk @@ -467,6 +467,7 @@ By default Boost.PFR [*auto-detects your compiler abilities] and automatically d [[*BOOST_PFR_USE_LOOPHOLE*] [Define to `1` if you wish to override Boost.PFR choice and exploit [@http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2118 CWG 2118] for reflection. Define to `0` to override Boost.PFR choice and disable CWG 2118 usage.]] [[*BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE*] [Define to `0` if you are hit by the template instantiation depth issues with `std::make_integer_sequence` and wish to use Boost.PFR version of that metafunction. Define to `1` to override Boost.PFR detection logic. ]] [[*BOOST_PFR_HAS_GUARANTEED_COPY_ELISION*] [Define to `0` if your compiler does not implement C++17 guaranteed copy elision properly and fails to reflect aggregates with non-movable fields. Define to `1` to override Boost.PFR detection logic. ]] + [[*BOOST_NO_PFR*] [On platforms where Boost.PFR is not supported, the boost/pfr/config.hpp header defines the BOOST_NO_PFR macro equals 1. Defining this macro as 1 before including the header disables the Boost.PFR library. ]] ] diff --git a/include/boost/pfr/config.hpp b/include/boost/pfr/config.hpp index e7fc081..01a6615 100644 --- a/include/boost/pfr/config.hpp +++ b/include/boost/pfr/config.hpp @@ -1,4 +1,5 @@ // Copyright (c) 2016-2022 Antony Polukhin +// Copyright (c) 2022 Denis Mikhailov // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/include/boost/pfr/detail/config.hpp b/include/boost/pfr/detail/config.hpp index 3252041..26e0200 100644 --- a/include/boost/pfr/detail/config.hpp +++ b/include/boost/pfr/detail/config.hpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 Antony Polukhin // Copyright (c) 2022 Denis Mikhailov // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -13,10 +14,11 @@ #error Boost.PFR library is not supported in your environment. \ Try one of the possible solutions: \ - 1. enable C++14; \ - 2. enable C++17; \ - 3. update your compiler; \ - or disable this error by '-DBOOST_NO_PFR=0' if you know what you do. + 1. try to take away an '-DBOOST_NO_PFR=1', if it exists \ + 2. enable C++14; \ + 3. enable C++17; \ + 4. update your compiler; \ + or disable this error by '-DBOOST_NO_PFR=0' if you really know what are you doing. #endif // BOOST_NO_PFR diff --git a/test/print_config.cpp b/test/print_config.cpp index 7bc0e41..2c514b3 100644 --- a/test/print_config.cpp +++ b/test/print_config.cpp @@ -3,7 +3,7 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#include +#include // inclusion of an another PFR header may fail when BOOST_NO_PFR=1 #include @@ -13,6 +13,7 @@ int main() { << "BOOST_PFR_USE_LOOPHOLE == " << BOOST_PFR_USE_LOOPHOLE << '\n' << "BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE == " << BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE << '\n' << "BOOST_PFR_HAS_GUARANTEED_COPY_ELISION == " << BOOST_PFR_HAS_GUARANTEED_COPY_ELISION << '\n' + << "BOOST_NO_PFR == " << BOOST_NO_PFR << '\n' << "__cplusplus == " << __cplusplus << '\n' #ifdef __cpp_structured_bindings << "__cpp_structured_bindings == " << __cpp_structured_bindings << '\n' From 6a38a072853a242055921e499b5dced21eb49fe4 Mon Sep 17 00:00:00 2001 From: denzor200 Date: Sat, 17 Dec 2022 00:35:56 +0400 Subject: [PATCH 5/8] Add test 'boost_no_pfr_macro' --- test/compile-fail/boost_no_pfr_macro.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/compile-fail/boost_no_pfr_macro.cpp diff --git a/test/compile-fail/boost_no_pfr_macro.cpp b/test/compile-fail/boost_no_pfr_macro.cpp new file mode 100644 index 0000000..2d66720 --- /dev/null +++ b/test/compile-fail/boost_no_pfr_macro.cpp @@ -0,0 +1,10 @@ +// Copyright (c) 2022 Denis Mikhailov +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_NO_PFR 1 +#include + +int main() { } + From bf5bd10b36dcc9897f683cea9f75a2f994f551f0 Mon Sep 17 00:00:00 2001 From: denzor200 Date: Sun, 18 Dec 2022 21:52:40 +0400 Subject: [PATCH 6/8] review discussions --- doc/pfr.qbk | 2 +- include/boost/pfr/config.hpp | 6 +++--- include/boost/pfr/detail/config.hpp | 8 ++++---- ..._no_pfr_macro.cpp => boost_pfr_disabled_via_macro.cpp} | 2 +- test/print_config.cpp | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) rename test/compile-fail/{boost_no_pfr_macro.cpp => boost_pfr_disabled_via_macro.cpp} (89%) mode change 100644 => 100755 diff --git a/doc/pfr.qbk b/doc/pfr.qbk index 6373e3c..23c34cd 100755 --- a/doc/pfr.qbk +++ b/doc/pfr.qbk @@ -469,7 +469,7 @@ By default Boost.PFR [*auto-detects your compiler abilities] and automatically d [[*BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE*] [Define to `0` if you are hit by the template instantiation depth issues with `std::make_integer_sequence` and wish to use Boost.PFR version of that metafunction. Define to `1` to override Boost.PFR detection logic. ]] [[*BOOST_PFR_HAS_GUARANTEED_COPY_ELISION*] [Define to `0` if your compiler does not implement C++17 guaranteed copy elision properly and fails to reflect aggregates with non-movable fields. Define to `1` to override Boost.PFR detection logic. ]] [[*BOOST_PFR_ENABLE_IMPLICIT_REFLECTION*] [Define to `0` if you are hit by lots of non-effective choices made by implicitly reflection. Define to `1` to override Boost.PFR detection logic. ]] - [[*BOOST_NO_PFR*] [On platforms where Boost.PFR is not supported, the boost/pfr/config.hpp header defines the BOOST_NO_PFR macro equals 1. Defining this macro as 1 before including the header disables the Boost.PFR library. ]] + [[*BOOST_PFR_ENABLED*] [On platforms where Boost.PFR is not supported, the `boost/pfr/config.hpp` header defines the BOOST_PFR_ENABLED macro equal to 0. Defining this macro as 0 before including the header disables the Boost.PFR library. ]] ] diff --git a/include/boost/pfr/config.hpp b/include/boost/pfr/config.hpp index 032e03f..b7acac5 100755 --- a/include/boost/pfr/config.hpp +++ b/include/boost/pfr/config.hpp @@ -101,11 +101,11 @@ # define BOOST_PFR_MAYBE_UNUSED #endif -#ifndef BOOST_NO_PFR +#ifndef BOOST_PFR_ENABLED # ifdef BOOST_PFR_NOT_SUPPORTED -# define BOOST_NO_PFR 1 +# define BOOST_PFR_ENABLED 0 # else -# define BOOST_NO_PFR 0 +# define BOOST_PFR_ENABLED 1 # endif #endif diff --git a/include/boost/pfr/detail/config.hpp b/include/boost/pfr/detail/config.hpp index 26e0200..8191323 100755 --- a/include/boost/pfr/detail/config.hpp +++ b/include/boost/pfr/detail/config.hpp @@ -10,17 +10,17 @@ #include -#if BOOST_NO_PFR +#if !BOOST_PFR_ENABLED #error Boost.PFR library is not supported in your environment. \ Try one of the possible solutions: \ - 1. try to take away an '-DBOOST_NO_PFR=1', if it exists \ + 1. try to take away an '-DBOOST_PFR_ENABLED=0', if it exists \ 2. enable C++14; \ 3. enable C++17; \ 4. update your compiler; \ - or disable this error by '-DBOOST_NO_PFR=0' if you really know what are you doing. + or disable this error by '-DBOOST_PFR_ENABLED=1' if you really know what are you doing. -#endif // BOOST_NO_PFR +#endif // !BOOST_PFR_ENABLED #endif // BOOST_PFR_DETAIL_CONFIG_HPP diff --git a/test/compile-fail/boost_no_pfr_macro.cpp b/test/compile-fail/boost_pfr_disabled_via_macro.cpp old mode 100644 new mode 100755 similarity index 89% rename from test/compile-fail/boost_no_pfr_macro.cpp rename to test/compile-fail/boost_pfr_disabled_via_macro.cpp index 2d66720..b561b56 --- a/test/compile-fail/boost_no_pfr_macro.cpp +++ b/test/compile-fail/boost_pfr_disabled_via_macro.cpp @@ -3,7 +3,7 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#define BOOST_NO_PFR 1 +#define BOOST_PFR_ENABLED 0 #include int main() { } diff --git a/test/print_config.cpp b/test/print_config.cpp index 1e5c2c9..aed4238 100755 --- a/test/print_config.cpp +++ b/test/print_config.cpp @@ -3,7 +3,7 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#include // inclusion of an another PFR header may fail when BOOST_NO_PFR=1 +#include // inclusion of an another PFR header may fail when BOOST_PFR_ENABLED=0 #include @@ -14,7 +14,7 @@ int main() { << "BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE == " << BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE << '\n' << "BOOST_PFR_HAS_GUARANTEED_COPY_ELISION == " << BOOST_PFR_HAS_GUARANTEED_COPY_ELISION << '\n' << "BOOST_PFR_ENABLE_IMPLICIT_REFLECTION == " << BOOST_PFR_ENABLE_IMPLICIT_REFLECTION << '\n' - << "BOOST_NO_PFR == " << BOOST_NO_PFR << '\n' + << "BOOST_PFR_ENABLED == " << BOOST_PFR_ENABLED << '\n' << "__cplusplus == " << __cplusplus << '\n' #ifdef __cpp_structured_bindings << "__cpp_structured_bindings == " << __cpp_structured_bindings << '\n' From 5010309967ee2d5e01a432982a9726d68ded513d Mon Sep 17 00:00:00 2001 From: denzor200 Date: Sun, 18 Dec 2022 21:54:58 +0400 Subject: [PATCH 7/8] permissions --- doc/pfr.qbk | 0 include/boost/pfr/config.hpp | 0 include/boost/pfr/detail/config.hpp | 0 test/compile-fail/boost_pfr_disabled_via_macro.cpp | 0 test/print_config.cpp | 0 5 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 doc/pfr.qbk mode change 100755 => 100644 include/boost/pfr/config.hpp mode change 100755 => 100644 include/boost/pfr/detail/config.hpp mode change 100755 => 100644 test/compile-fail/boost_pfr_disabled_via_macro.cpp mode change 100755 => 100644 test/print_config.cpp diff --git a/doc/pfr.qbk b/doc/pfr.qbk old mode 100755 new mode 100644 diff --git a/include/boost/pfr/config.hpp b/include/boost/pfr/config.hpp old mode 100755 new mode 100644 diff --git a/include/boost/pfr/detail/config.hpp b/include/boost/pfr/detail/config.hpp old mode 100755 new mode 100644 diff --git a/test/compile-fail/boost_pfr_disabled_via_macro.cpp b/test/compile-fail/boost_pfr_disabled_via_macro.cpp old mode 100755 new mode 100644 diff --git a/test/print_config.cpp b/test/print_config.cpp old mode 100755 new mode 100644 From 58ce59cf38a37c1542efea2479b11051382e13f0 Mon Sep 17 00:00:00 2001 From: denzor200 Date: Sun, 18 Dec 2022 22:01:57 +0400 Subject: [PATCH 8/8] missed BOOST_PFR_ENABLED in error message --- include/boost/pfr/config.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/pfr/config.hpp b/include/boost/pfr/config.hpp index b7acac5..b7df6da 100644 --- a/include/boost/pfr/config.hpp +++ b/include/boost/pfr/config.hpp @@ -17,7 +17,7 @@ // * MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) #ifdef BOOST_PFR_NOT_SUPPORTED -# error Please, don't set BOOST_PFR_NOT_SUPPORTED value manually, use '-DBOOST_NO_PFR=1' instead of it +# error Please, don't set BOOST_PFR_NOT_SUPPORTED value manually, use '-DBOOST_PFR_ENABLED=0' instead of it #endif #if defined(_MSC_VER)