diff --git a/test/core/run/member_to_index.cpp b/test/core/run/member_to_index.cpp index 3def082..72b1333 100644 --- a/test/core/run/member_to_index.cpp +++ b/test/core/run/member_to_index.cpp @@ -5,6 +5,7 @@ #include +#include #include #include @@ -15,7 +16,14 @@ struct Sample { }; int main() { +#if BOOST_PFR_USE_CPP17 || BOOST_PFR_USE_CPP26 static_assert(boost::pfr::index_of(&Sample::x) == 0); static_assert(boost::pfr::index_of(&Sample::y) == 1); static_assert(boost::pfr::index_of(&Sample::z) == 2); +#else + assert(boost::pfr::index_of(&Sample::x) == 0); + = 0 + assert(boost::pfr::index_of(&Sample::y) == 1); + assert(boost::pfr::index_of(&Sample::z) == 2); +#endif }