There might be a regression in the last refl-cpp release:
refl::util::detail::filter(..) seems to invert the member order which has a notable impact on the find_first() method.
#include <iostream>
#include <https://raw.githubusercontent.com/veselink1/refl-cpp/master/include/refl.hpp>
struct Point {
float x;
float y;
float z;
};
REFL_TYPE(Point)
REFL_FIELD(x)
REFL_FIELD(y)
REFL_FIELD(z)
REFL_END
constexpr auto members = refl::reflect<Point>().members;
constexpr auto condition = [](auto member) { return true; };
static_assert(find_first(members, condition).name == "x"); // <- fails but should be correct
// static_assert(find_first(members, condition).name == "z"); // works
See compiler-explorer for further details and a live demo of this feature.
There might be a regression in the last refl-cpp release:
refl::util::detail::filter(..)
seems to invert the member order which has a notable impact on thefind_first()
method.See compiler-explorer for further details and a live demo of this feature.