3 #include "../stream/serialize_traits.h"
10 template<
typename Void,
typename T,
typename Stream,
typename... Args>
13 template<
typename T,
typename Stream,
typename... Args>
14 struct has_serialize<std::void_t<decltype(serialize_traits<T>::serialize(std::declval<Stream&>(), std::declval<Args>()...))>, T, Stream, Args...> : std::true_type {};
16 template<
typename T,
typename Stream,
typename... Args>
19 template<
typename T,
typename Stream,
typename... Args>
24 template<
typename T,
typename R =
bool>
27 template<
typename T,
typename R =
bool>
32 template<
typename Void,
typename T,
typename Stream,
typename... Args>
35 template<
typename T,
typename Stream,
typename... Args>
37 std::bool_constant<noexcept(serialize_traits<T>::serialize(std::declval<Stream&>(), std::declval<Args>()...))> {};
39 template<
typename T,
typename Stream,
typename... Args>
45 using base_t =
typename std::remove_const_t<std::remove_pointer_t<std::decay_t<T>>>;
49 template<
typename Void,
typename Trait,
typename Stream,
typename... Args>
56 template<
typename Trait,
typename Stream,
typename... Args>
58 !std::is_pointer_v<std::decay_t<Trait>> &&
59 has_serialize_v<base_t<Trait>, Stream, Trait, Args...>>,
60 Trait, Stream, Args...>
66 template<
typename Trait,
typename Stream,
typename... Args>
68 !std::is_pointer_v<std::decay_t<Trait>> &&
69 has_serialize_v<std::add_const_t<base_t<Trait>>, Stream, Trait, Args...>>,
70 Trait, Stream, Args...>
72 using type = std::add_const_t<base_t<Trait>>;
76 template<
typename Trait,
typename Stream,
typename... Args>
78 std::is_pointer_v<std::decay_t<Trait>> &&
79 has_serialize_v<std::add_pointer_t<base_t<Trait>>, Stream, Trait, Args...>>,
80 Trait, Stream, Args...>
82 using type = std::add_pointer_t<base_t<Trait>>;
86 template<
typename Trait,
typename Stream,
typename... Args>
88 std::is_pointer_v<std::decay_t<Trait>> &&
89 has_serialize_v<std::add_pointer_t<std::add_const_t<base_t<Trait>>>, Stream, Trait, Args...>>,
90 Trait, Stream, Args...>
92 using type = std::add_pointer_t<std::add_const_t<base_t<Trait>>>;
95 template<
typename Trait,
typename Stream,
typename... Args>
100 template<
typename Trait,
typename Stream,
typename... Args>
103 template<
typename Trait,
typename Stream,
typename... Args>
std::enable_if_t< T::writing, R > is_writing_t
Definition: meta.h:25
constexpr bool is_deduce_serialize_noexcept_v
Definition: meta.h:104
has_serialize_t< deduce_trait_t< Trait, Stream, Args... >, Stream, Trait, Args... > has_deduce_serialize_t
Definition: meta.h:101
constexpr bool is_serialize_noexcept_v
Definition: meta.h:40
typename std::remove_const_t< std::remove_pointer_t< std::decay_t< T > >> base_t
Definition: meta.h:45
typename deduce_trait< void, Trait, Stream, Args... >::type deduce_trait_t
Definition: meta.h:96
constexpr bool has_serialize_v
Definition: meta.h:20
std::enable_if_t< T::reading, R > is_reading_t
Definition: meta.h:28
std::void_t< decltype(serialize_traits< T >::serialize(std::declval< Stream & >(), std::declval< Args >()...))> has_serialize_t
Definition: meta.h:17
A class for specializing trait serialization functions.
Definition: serialize_traits.h:11
std::add_const_t< base_t< Trait > > type
Definition: meta.h:72
base_t< Trait > type
Definition: meta.h:62
std::add_pointer_t< std::add_const_t< base_t< Trait > >> type
Definition: meta.h:92
std::add_pointer_t< base_t< Trait > > type
Definition: meta.h:82
Trait type
Definition: meta.h:52