@@ -143,29 +143,6 @@ struct ReadDestUpdate
143
143
144
144
145
145
146
- template <typename KeyLocalType, typename ValueLocalType, typename Input, typename ReadDest>
147
- decltype (auto ) CustomReadField(TypeList<std::pair<KeyLocalType, ValueLocalType>>,
148
- Priority<1 >,
149
- InvokeContext& invoke_context,
150
- Input&& input,
151
- ReadDest&& read_dest)
152
- {
153
- const auto & pair = input.get ();
154
- using Accessors = typename ProxyStruct<typename Decay<decltype (pair)>::Reads>::Accessors;
155
-
156
- ReadField (TypeList<KeyLocalType>(), invoke_context, Make<StructField, std::tuple_element_t <0 , Accessors>>(pair),
157
- ReadDestEmplace (TypeList<KeyLocalType>(), [&](auto &&... key_args) -> auto & {
158
- KeyLocalType* key = nullptr ;
159
- ReadField (TypeList<ValueLocalType>(), invoke_context, Make<StructField, std::tuple_element_t <1 , Accessors>>(pair),
160
- ReadDestEmplace (TypeList<ValueLocalType>(), [&](auto &&... value_args) -> auto & {
161
- auto & ret = read_dest.construct (std::piecewise_construct, std::forward_as_tuple (key_args...),
162
- std::forward_as_tuple (value_args...));
163
- key = &ret.first ;
164
- return ret.second ;
165
- }));
166
- return *key;
167
- }));
168
- }
169
146
170
147
// TODO: Should generalize this to work with arbitrary length tuples, not just length 2-tuples.
171
148
template <typename KeyLocalType, typename ValueLocalType, typename Input, typename ReadDest>
@@ -607,21 +584,6 @@ void CustomBuildField(TypeList<std::exception>,
607
584
{
608
585
BuildField (TypeList<std::string>(), invoke_context, output, std::string (value.what ()));
609
586
}
610
-
611
- // FIXME: Overload on output type instead of value type and switch to std::get and merge with next overload
612
- template <typename KeyLocalType, typename ValueLocalType, typename Value, typename Output>
613
- void CustomBuildField (TypeList<std::pair<KeyLocalType, ValueLocalType>>,
614
- Priority<1 >,
615
- InvokeContext& invoke_context,
616
- Value&& value,
617
- Output&& output)
618
- {
619
- auto pair = output.init ();
620
- using Accessors = typename ProxyStruct<typename decltype (pair)::Builds>::Accessors;
621
- BuildField (TypeList<KeyLocalType>(), invoke_context, Make<StructField, std::tuple_element_t <0 , Accessors>>(pair), value.first );
622
- BuildField (TypeList<ValueLocalType>(), invoke_context, Make<StructField, std::tuple_element_t <1 , Accessors>>(pair), value.second );
623
- }
624
-
625
587
// TODO: Should generalize this to work with arbitrary length tuples, not just length 2-tuples.
626
588
template <typename KeyLocalType, typename ValueLocalType, typename Value, typename Output>
627
589
void CustomBuildField (TypeList<std::tuple<KeyLocalType, ValueLocalType>>,
0 commit comments