summaryrefslogtreecommitdiffhomepage
path: root/entity/metadata.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-19 13:35:42 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-19 13:44:33 +0100
commit71b2c6cd30b7715e3678f4bb1ed4fba67f6b797e (patch)
tree4b092817e7c68fac54f7a490b50fdef03b06dcba /entity/metadata.hpp
parentd94d56bb395f64a819c72fe5d09228ec31e0dd93 (diff)
constantly<T> should be public API
Diffstat (limited to 'entity/metadata.hpp')
-rw-r--r--entity/metadata.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/entity/metadata.hpp b/entity/metadata.hpp
index 8bd36cb8..b425d0a1 100644
--- a/entity/metadata.hpp
+++ b/entity/metadata.hpp
@@ -68,19 +68,19 @@ struct find_reader<Obj, Type, Default, I, F, Fs...> { using type = F; static con
template<typename Obj, typename Type, typename... Fs>
using find_reader2 = find_reader<Obj, Type, Type, 0, Fs...>;
-template<typename Obj, auto constant>
-constexpr auto constantly = [](const Obj&) constexpr { return constant; };
-
} // namespace floormat::entities::detail
namespace floormat::entities {
+template<typename Obj, auto constant>
+constexpr auto constantly = [](const Obj&) constexpr { return constant; };
+
template<typename Obj, typename Type> struct entity_field_base {};
template<typename Obj, typename Type, FieldReader<Obj, Type> R, FieldWriter<Obj, Type> W, typename... Ts>
struct entity_field : entity_field_base<Obj, Type> {
private:
- static constexpr auto default_predicate = detail::constantly<Obj, field_status::enabled>;
+ static constexpr auto default_predicate = constantly<Obj, field_status::enabled>;
using default_predicate_t = std::decay_t<decltype(default_predicate)>;
using c_predicate = detail::find_reader<Obj, field_status, default_predicate_t, 0, Ts...>;
using c_range = detail::find_reader2<Obj, constraints::range<Type>, Ts...>;