@@ -141,43 +141,6 @@ struct ReadDestUpdate
141
141
Value& m_value;
142
142
};
143
143
144
- template <size_t index, typename LocalType, typename Input, typename Value>
145
- void ReadOne (TypeList<LocalType> param,
146
- InvokeContext& invoke_context,
147
- Input&& input,
148
- Value&& value,
149
- typename std::enable_if<index != ProxyType<LocalType>::fields>::type* enable = nullptr )
150
- {
151
- using Index = std::integral_constant<size_t , index>;
152
- using Struct = typename ProxyType<LocalType>::Struct;
153
- using Accessor = typename std::tuple_element<index, typename ProxyStruct<Struct>::Accessors>::type;
154
- const auto & struc = input.get ();
155
- auto && field_value = value.*ProxyType<LocalType>::get (Index ());
156
- ReadField (TypeList<RemoveCvRef<decltype (field_value)>>(), invoke_context, Make<StructField, Accessor>(struc),
157
- ReadDestUpdate (field_value));
158
- ReadOne<index + 1 >(param, invoke_context, input, value);
159
- }
160
-
161
- template <size_t index, typename LocalType, typename Input, typename Value>
162
- void ReadOne (TypeList<LocalType> param,
163
- InvokeContext& invoke_context,
164
- Input& input,
165
- Value& value,
166
- typename std::enable_if<index == ProxyType<LocalType>::fields>::type* enable = nullptr )
167
- {
168
- }
169
-
170
- template <typename LocalType, typename Input, typename ReadDest>
171
- decltype (auto ) CustomReadField(TypeList<LocalType> param,
172
- Priority<1 >,
173
- InvokeContext& invoke_context,
174
- Input&& input,
175
- ReadDest&& read_dest,
176
- typename ProxyType<LocalType>::Struct* enable = nullptr )
177
- {
178
- return read_dest.update ([&](auto & value) { ReadOne<0 >(param, invoke_context, input, value); });
179
- }
180
-
181
144
// ! Overload CustomReadField to serialize objects that have CustomReadMessage
182
145
// ! overloads. Defining a CustomReadMessage overload is simpler than defining a
183
146
// ! CustomReadField overload because it only requires defining a normal
@@ -317,42 +280,6 @@ void CustomBuildField(TypeList<LocalType>, Priority<0>, InvokeContext& invoke_co
317
280
output.set (BuildPrimitive (invoke_context, std::forward<Value>(value), TypeList<decltype (output.get ())>()));
318
281
}
319
282
320
- template <size_t index, typename LocalType, typename Value, typename Output>
321
- void BuildOne (TypeList<LocalType> param,
322
- InvokeContext& invoke_context,
323
- Output&& output,
324
- Value&& value,
325
- typename std::enable_if < index<ProxyType<LocalType>::fields>::type * enable = nullptr )
326
- {
327
- using Index = std::integral_constant<size_t , index>;
328
- using Struct = typename ProxyType<LocalType>::Struct;
329
- using Accessor = typename std::tuple_element<index, typename ProxyStruct<Struct>::Accessors>::type;
330
- auto && field_output = Make<StructField, Accessor>(output);
331
- auto && field_value = value.*ProxyType<LocalType>::get (Index ());
332
- BuildField (TypeList<Decay<decltype (field_value)>>(), invoke_context, field_output, field_value);
333
- BuildOne<index + 1 >(param, invoke_context, output, value);
334
- }
335
-
336
- template <size_t index, typename LocalType, typename Value, typename Output>
337
- void BuildOne (TypeList<LocalType> param,
338
- InvokeContext& invoke_context,
339
- Output&& output,
340
- Value&& value,
341
- typename std::enable_if<index == ProxyType<LocalType>::fields>::type* enable = nullptr )
342
- {
343
- }
344
-
345
- template <typename LocalType, typename Value, typename Output>
346
- void CustomBuildField (TypeList<LocalType> local_type,
347
- Priority<1 >,
348
- InvokeContext& invoke_context,
349
- Value&& value,
350
- Output&& output,
351
- typename ProxyType<LocalType>::Struct* enable = nullptr )
352
- {
353
- BuildOne<0 >(local_type, invoke_context, output.init (), value);
354
- }
355
-
356
283
// ! PassField override for callable interface reference arguments.
357
284
template <typename Accessor, typename LocalType, typename ServerContext, typename Fn, typename ... Args>
358
285
auto PassField (Priority<1 >, TypeList<LocalType&>, ServerContext& server_context, Fn&& fn, Args&&... args)
0 commit comments