The example should not compile, because the nested types are not aggregates.
In C++14 it gives a correct static assert
../../../boost/pfr/detail/core14_classic.hpp:509:5: error:
staticassert failed "====================> Boost.PFR: Type can not be
used is flat functions, because it's not POD"
in C++17 it also gives a correct static assert
../../../boost/pfr/detail/fields_count.hpp:225:9: error: static
assertion failed: ====================> Boost.PFR: Type must be
aggregate initializable.
Clang crashes after that.
GCC goes into an infinite loop, ignoring all the template
instantiation depth limitations and static_assert messages printing.
Using BOOST_PFR_PRECISE_FUNCTIONS_FOR now gives a complaint of missing
sd::hash specialization:
../../../boost/pfr/detail/functional.hpp:133:9: error: static_assert
failed due to requirement 'sizeof(boost::basic_string_view<char,
std::char_traits >) && false' "====================> Boost.PFR:
std::hash not specialized for type T"
I've added the tests and will report issues to the compiler developers soon.
The example should not compile, because the nested types are not aggregates.
In C++14 it gives a correct static assert
../../../boost/pfr/detail/core14_classic.hpp:509:5: error: staticassert failed "====================> Boost.PFR: Type can not be used is flat functions, because it's not POD"
in C++17 it also gives a correct static assert
../../../boost/pfr/detail/fields_count.hpp:225:9: error: static assertion failed: ====================> Boost.PFR: Type must be aggregate initializable.
Clang crashes after that. GCC goes into an infinite loop, ignoring all the template instantiation depth limitations and static_assert messages printing.
Using BOOST_PFR_PRECISE_FUNCTIONS_FOR now gives a complaint of missing sd::hash specialization:
../../../boost/pfr/detail/functional.hpp:133:9: error: static_assert failed due to requirement 'sizeof(boost::basic_string_view<char, std::char_traits >) && false' "====================> Boost.PFR:
std::hash not specialized for type T"
I've added the tests and will report issues to the compiler developers soon.