ECSTASY
All in the name
Loading...
Searching...
No Matches
can_update_type.hpp
Go to the documentation of this file.
1
11
12#ifndef ECSTASY_SERIALIZATION_CAN_UPDATE_TYPE_HPP_
13#define ECSTASY_SERIALIZATION_CAN_UPDATE_TYPE_HPP_
14
15#include <type_traits>
16
18
20{
21
32 template <typename S, typename T, typename = std::void_t<>>
34
36 template <concepts::is_serializer S, typename T>
37 struct can_update_type<S, T, std::void_t<decltype(std::declval<S &>().update(std::declval<T &>()))>>
38 : std::true_type {};
39
48 template <concepts::is_serializer S, typename C>
50
60 template <typename S, typename T, typename = std::void_t<>>
62
64 template <typename S, typename T>
65 struct has_update_impl_for_type<S, T, std::void_t<decltype(std::declval<S &>().updateImpl(std::declval<T &>()))>>
66 : std::true_type {};
67
77 template <typename S, typename C>
79
80} // namespace ecstasy::serialization::traits
81
82#endif /* !ECSTASY_SERIALIZATION_CAN_UPDATE_TYPE_HPP_ */
Concept to check if a type is a serializer.
Namespace regrouping the serialization ecstasy type traits.
bool constexpr has_update_impl_for_type_v
Alias for has_update_impl_for_typ<S, C>::value.
bool constexpr can_update_type_v
Alias for can_update_type<S, C>::value.
Concept to check if a type can be updated with a serializer.
Concept to check if a serializer has a specific update implementation for a type.