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'