diff --git a/deps/ox/src/ox/model/fieldcounter.hpp b/deps/ox/src/ox/model/fieldcounter.hpp index d65af665..38142cdd 100644 --- a/deps/ox/src/ox/model/fieldcounter.hpp +++ b/deps/ox/src/ox/model/fieldcounter.hpp @@ -57,14 +57,20 @@ class FieldCounter { } +namespace detail { template -constexpr auto ModelFieldCount_v = [] { +consteval auto modelFieldCount() { auto a = std::allocator(); auto t = a.allocate(1); detail::FieldCounter c; - oxAssert(model(&c, t), "Count failed"); + const auto err = model(&c, t); + //oxAssert(err, "Count failed"); a.deallocate(t, 1); return c.fields; -}(); +} +} + +template +constexpr auto ModelFieldCount_v = detail::modelFieldCount(); }