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'