summaryrefslogtreecommitdiffhomepage
path: root/src/entity.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-14 14:53:09 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-14 15:20:29 +0100
commite25f9a8b813a5de01d3c748a1710ffdc6f9935ec (patch)
tree379d04471ec3ce3957524a76cd2e9acdc13c6be3 /src/entity.hpp
parentb7ecc52bb4ca76bd802e199928eef104c2e0b538 (diff)
entity: convert constraints to static_assert
Diffstat (limited to 'src/entity.hpp')
-rw-r--r--src/entity.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/entity.hpp b/src/entity.hpp
index 2eb99e27..1c055ce7 100644
--- a/src/entity.hpp
+++ b/src/entity.hpp
@@ -95,12 +95,14 @@ struct write_field<Obj, FieldType, FieldType Obj::*> {
} // namespace detail
template<typename Obj>
-requires std::is_same_v<Obj, std::decay_t<Obj>>
struct Entity final {
+ static_assert(std::is_same_v<Obj, std::decay_t<Obj>>);
+
template<typename Type>
- requires std::is_same_v<Type, std::decay_t<Type>>
struct type final
{
+ static_assert(std::is_same_v<Type, std::decay_t<Type>>);
+
template<FieldReader<Obj, Type> R, FieldWriter<Obj, Type> W>
struct field final
{