diff --git a/include/boost/pfr/core.hpp b/include/boost/pfr/core.hpp index a6aa5e9..c9c824a 100644 --- a/include/boost/pfr/core.hpp +++ b/include/boost/pfr/core.hpp @@ -287,7 +287,7 @@ constexpr std::size_t index_of(M T::*mem_ptr) { template void operator()(const T&, std::size_t) {} - void operator()(const T& field, std::size_t idx) { + void operator()(const M& field, std::size_t idx) { const void* filed_address = std::addressof(field); if (target_address == filed_address) { result = idx;