diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-19 07:27:49 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-19 07:27:49 +0100 |
commit | 0533360642ff320a1a7d25ed2911a6c44de8d6e9 (patch) | |
tree | c5a4ed240decaa495aa9f439016acf3b9d46988c /entity | |
parent | 167798dd34886c93657534ac8f976418b455a5d6 (diff) |
entity: add field enablement predicate
Diffstat (limited to 'entity')
-rw-r--r-- | entity/metadata.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/entity/metadata.hpp b/entity/metadata.hpp index a35e0cc6..dc7d9f1d 100644 --- a/entity/metadata.hpp +++ b/entity/metadata.hpp @@ -211,10 +211,10 @@ constexpr erased_accessor entity_field<Obj, Type, R, W, P>::erased() const return erased_accessor { (void*)&reader, writer ? (void*)&writer : nullptr, - std::is_same_v<P, std::nullptr_t> ? (const void*)&predicate : nullptr, + !std::is_same_v<P, std::nullptr_t> ? (const void*)&predicate : nullptr, name, obj_name, field_name, reader_fn, writer ? writer_fn : writer_stub_fn, - std::is_same_v<P, std::nullptr_t> ? predicate_fn : predicate_stub_fn, + !std::is_same_v<P, std::nullptr_t> ? predicate_fn : predicate_stub_fn, }; } |