diff options
Diffstat (limited to 'entity/concepts.hpp')
-rw-r--r-- | entity/concepts.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/entity/concepts.hpp b/entity/concepts.hpp index 682360dd..e30a2c5e 100644 --- a/entity/concepts.hpp +++ b/entity/concepts.hpp @@ -67,6 +67,11 @@ struct read_field<Obj, Type, Type (Obj::*)() const> { }; template<typename Obj, typename Type> +struct read_field<Obj, Type, const Type Obj::*> { + static constexpr Type read(const Obj& x, const Type Obj::*r) { return x.*r; } +}; + +template<typename Obj, typename Type> struct read_field<Obj, Type, Type Obj::*> { static constexpr Type read(const Obj& x, Type Obj::*r) { return x.*r; } }; |