mirror of
https://github.com/boostorg/pfr.git
synced 2026-01-19 04:22:13 +00:00
review
This commit is contained in:
24
doc/pfr.qbk
24
doc/pfr.qbk
@@ -522,7 +522,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_PFR_ENABLE_GET_NAME_STATIC*] [On platforms where field's names extracting is not supported, the 'boost/pfr/config.hpp' header defines the BOOST_PFR_ENABLE_GET_NAME_STATIC macro equal to 0. Defining this macro as 0 before including the header disables the ability to get a field's name. ]]
|
||||
[[*BOOST_PFR_CORE_NAME_ENABLED*] [On platforms where field's names extracting is not supported, the 'boost/pfr/config.hpp' header defines the BOOST_PFR_CORE_NAME_ENABLED macro equal to 0. Defining this macro as 0 before including the header disables the ability to get a field's name. ]]
|
||||
[[*BOOST_PFR_FUNCTION_SIGNATURE*] [On platforms which are unknown by Boost.PFR library, the 'boost/pfr/config.hpp' header defines the BOOST_PFR_FUNCTION_SIGNATURE macro equal to "". Defining this macro before including the header might help the library to work on your specific platform. See details [link boost_pfr.limitations_of_field_names_refle [*here]]. ]]
|
||||
[[*BOOST_PFR_CORE_NAME_PARSING*] [On platforms which are unknown by Boost.PFR library, the 'boost/pfr/config.hpp' header defines the BOOST_PFR_CORE_NAME_PARSING macro equal to (0,0,false). Defining this macro before including the header might help the library to work on your specific platform. See details [link boost_pfr.limitations_of_field_names_refle [*here]]. ]]
|
||||
[[*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. ]]
|
||||
@@ -556,13 +556,13 @@ Boost.PFRs extraction of field name has been tested and successfully work on man
|
||||
[section Define the BOOST_PFR_FUNCTION_SIGNATURE macro]
|
||||
|
||||
If you get the following error during compilation
|
||||
``
|
||||
PFRs extraction of field name could not detect your compiler.
|
||||
Please make the BOOST_PFR_FUNCTION_SIGNATURE macro use
|
||||
correct compiler macro for getting the whole function name.
|
||||
Define BOOST_PFR_CORE_NAME_PARSING to correct value after that.
|
||||
``
|
||||
then you are using a compiler that was not tested with this library.
|
||||
```
|
||||
error: static_assert failed "====================> Boost.PFR: Extraction of field name could not detect your compiler.
|
||||
Please make the BOOST_PFR_FUNCTION_SIGNATURE macro use
|
||||
correct compiler macro for getting the whole function name.
|
||||
Define BOOST_PFR_CORE_NAME_PARSING to correct value after that."
|
||||
```
|
||||
then you are using a compiler that was not tested with this library.
|
||||
|
||||
BOOST_PFR_FUNCTION_SIGNATURE must be defined to a compiler specific macro, that outputs the *whole*
|
||||
function signature including non-type template parameters.
|
||||
@@ -574,8 +574,8 @@ function signature including non-type template parameters.
|
||||
|
||||
Let's assume the structure `namespace A { struct A { int fn; }; }`
|
||||
|
||||
If the output of `boost::pfr::get_name<0, A::A>()`
|
||||
returns not just `fn` but also a lot of text around the `fn`
|
||||
If the output of `boost::pfr::get_name<0, A::A>()`
|
||||
returns not just `fn` but also a lot of text around the `fn`
|
||||
or does not return name at all
|
||||
then you are using a compiler that was not tested with this library and you need to setup the
|
||||
BOOST_PFR_CORE_NAME_PARSING macro.
|
||||
@@ -583,9 +583,9 @@ BOOST_PFR_CORE_NAME_PARSING macro.
|
||||
Here is a short instruction:
|
||||
|
||||
# get the output of `boost::pfr::get_name<0, A::A>()`
|
||||
# define BOOST_PFR_CORE_NAME_PARSING to
|
||||
# define BOOST_PFR_CORE_NAME_PARSING to
|
||||
`(skip_at_begin, skip_at_end, false, "")`, where
|
||||
* `skip_at_begin` is equal to characters count before the first occurrence of `fn` in output
|
||||
* `skip_at_begin` is equal to characters count before the first occurrence of `fn` in output
|
||||
* `skip_at_end` is equal to characters count after last occurrence of `fn` in output
|
||||
# check that `boost::pfr::get_name<0, A::A>()` returns "fn"
|
||||
# if it does not return `fn`, then define BOOST_PFR_CORE_NAME_PARSING to
|
||||
|
||||
Reference in New Issue
Block a user