diff --git a/example/examples.cpp b/example/examples.cpp index 03cff5f..ea497f4 100644 --- a/example/examples.cpp +++ b/example/examples.cpp @@ -15,9 +15,9 @@ struct foo_t { int i; nested_t nested; }; static_assert(std::is_same< - boost::pfr::flat_tuple_element_t<1, foo_t>, // Flat reflection + boost::pfr::flat_tuple_element_t<1, foo_t>, // Flat reflection. char // `char`, not `nested_t`! ->::value); +>::value, ""); // Requires C++17: @@ -26,7 +26,7 @@ static_assert(std::is_same< static_assert(std::is_same< boost::pfr::tuple_element_t<1, foo_t>, // Precise reflection. nested_t ->::value); //<- +>::value, ""); //<- #endif //-> //] [/pfr_intro] diff --git a/include/boost/pfr/detail/core14.hpp b/include/boost/pfr/detail/core14.hpp index aff58c9..372e818 100644 --- a/include/boost/pfr/detail/core14.hpp +++ b/include/boost/pfr/detail/core14.hpp @@ -597,7 +597,7 @@ decltype(auto) as_tuple(T&& val) noexcept { typedef std::remove_reference_t type; static_assert( boost::pfr::detail::is_flat_refelectable( std::make_index_sequence()>{} ), - "Not possible in C++14 to represent that type without loosing information. Use flat_ version or change type definition" + "Not possible in C++14 to represent that type without loosing information. Use boost::pfr::flat_ version, or change type definition, or enable C++17" ); return tie_as_flat_tuple(std::forward(val)); }