36 using implementation =
typename T::implementation;
37 using value_type =
typename T::value_type;
44 value_type
const&
get ()
const
46 assert(static_cast <implementation const*> (
this)->
check());
56 p_tValue = std::move(value);
58 assert(static_cast <implementation const*> (
this)->
check());
75 p_tValue = value_type{};
77 assert(!static_cast <implementation const*> (
this)->
check());
93 assert(!static_cast <implementation const*> (
this)->
check());
101 : p_tValue(std::move(value)),
104 assert(static_cast <implementation const*> (
this)->
check());
119 template <
typename... Args>
122 std::forward <std::tuple <Args&&...>> (args),
123 static_cast <typename
make_indices <sizeof... (Args)>::type*> (nullptr))
125 assert(static_cast <implementation const*> (
this)->
check());
129 template <
typename... Args,
typename... Indices>
131 : p_tValue{std::forward <Args> (std::get <Indices::value> (args))...},
137 value_type p_tValue {};
138 bool p_bIsSet {
false};
148 typename Specification,
149 template <
typename>
class Implementation = default_optional_value>
153 value_implementation_wrapper <
175 typename Specification,
176 template <
typename>
class Implementation,
181 Input& in, Output& out)
183 if (!in.check_flag(Flag))
185 interface <Name> (out).
clear();
190 return dispatch_read <value_alias> (in, out);
206 typename Specification,
207 template <
typename>
class Implementation,
212 Input
const& in, Output& out)
214 if (!interface <Name> (in).
check())
218 return dispatch_write <value_alias> (in, out);
234 typename Specification,
235 template <
typename>
class Implementation,
242 if (!interface <Name> (in).
check())
248 return dispatch_write <value_alias> (in, out);