@@ -155,7 +155,7 @@ struct decode_traits<std::pair<T1, T2>, CharT>
155
155
cursor.array_expected (ec);
156
156
if (JSONCONS_UNLIKELY (ec))
157
157
{
158
- return decode_result {decode_error{ec, cursor.line (), cursor.column ()}};
158
+ return result_type {decode_error{ec, cursor.line (), cursor.column ()}};
159
159
}
160
160
if (cursor.current ().event_type () != staj_event_type::begin_array)
161
161
{
@@ -164,28 +164,28 @@ struct decode_traits<std::pair<T1, T2>, CharT>
164
164
cursor.next (ec); // skip past array
165
165
if (JSONCONS_UNLIKELY (ec))
166
166
{
167
- return decode_result {decode_error{ec, cursor.line (), cursor.column ()}};
167
+ return result_type {decode_error{ec, cursor.line (), cursor.column ()}};
168
168
}
169
169
170
170
T1 v1 = decode_traits<T1,CharT>::try_decode (cursor, decoder, ec);
171
171
if (JSONCONS_UNLIKELY (!v1.has_value ())) {v1;}
172
172
cursor.next (ec);
173
173
if (JSONCONS_UNLIKELY (ec))
174
174
{
175
- return decode_result {decode_error{ec, cursor.line (), cursor.column ()}};
175
+ return result_type {decode_error{ec, cursor.line (), cursor.column ()}};
176
176
}
177
177
T2 v2 = decode_traits<T2, CharT>::try_decode (cursor, decoder, ec);
178
178
if (JSONCONS_UNLIKELY (ec))
179
179
{
180
- return decode_result {decode_error{ec, cursor.line (), cursor.column ()}};
180
+ return result_type {decode_error{ec, cursor.line (), cursor.column ()}};
181
181
}
182
182
cursor.next (ec);
183
183
184
184
if (cursor.current ().event_type () != staj_event_type::end_array)
185
185
{
186
186
return result_type{decode_error{conv_errc::not_pair, cursor.line (), cursor.column ()}};
187
187
}
188
- return decode_result {std::make_pair (v1, v2)};
188
+ return result_type {std::make_pair (v1, v2)};
189
189
}
190
190
};
191
191
@@ -211,7 +211,7 @@ struct decode_traits<T,CharT,
211
211
cursor.array_expected (ec);
212
212
if (JSONCONS_UNLIKELY (ec))
213
213
{
214
- return decode_result {decode_error{ec, cursor.line (), cursor.column ()}};
214
+ return result_type {decode_error{ec, cursor.line (), cursor.column ()}};
215
215
}
216
216
if (cursor.current ().event_type () != staj_event_type::begin_array)
217
217
{
@@ -221,7 +221,7 @@ struct decode_traits<T,CharT,
221
221
while (cursor.current ().event_type () != staj_event_type::end_array && !ec)
222
222
{
223
223
v.push_back (decode_traits<value_type,CharT>::try_decode (cursor, decoder, ec));
224
- if (JSONCONS_UNLIKELY (ec)) {return decode_result {decode_error{ec, cursor.line (), cursor.column ()}};}
224
+ if (JSONCONS_UNLIKELY (ec)) {return result_type {decode_error{ec, cursor.line (), cursor.column ()}};}
225
225
// std::cout << "read next 10\n";
226
226
cursor.next (ec);
227
227
}
@@ -370,7 +370,7 @@ struct decode_traits<T,CharT,
370
370
cursor.array_expected (ec);
371
371
if (JSONCONS_UNLIKELY (ec))
372
372
{
373
- return decode_result {decode_error{ec, cursor.line (), cursor.column ()}};
373
+ return result_type {decode_error{ec, cursor.line (), cursor.column ()}};
374
374
}
375
375
switch (cursor.current ().event_type ())
376
376
{
@@ -393,7 +393,7 @@ struct decode_traits<T,CharT,
393
393
}
394
394
else
395
395
{
396
- return decode_result {decode_error{ec, cursor.line (), cursor.column ()}};
396
+ return result_type {decode_error{ec, cursor.line (), cursor.column ()}};
397
397
}
398
398
}
399
399
case staj_event_type::begin_array:
@@ -445,7 +445,7 @@ struct decode_traits<T,CharT,
445
445
cursor.array_expected (ec);
446
446
if (JSONCONS_UNLIKELY (ec))
447
447
{
448
- return decode_result {decode_error{ec, cursor.line (), cursor.column ()}};
448
+ return result_type {decode_error{ec, cursor.line (), cursor.column ()}};
449
449
}
450
450
switch (cursor.current ().event_type ())
451
451
{
@@ -458,7 +458,7 @@ struct decode_traits<T,CharT,
458
458
}
459
459
typed_array_visitor<T> visitor (v);
460
460
cursor.read_to (visitor, ec);
461
- return decode_result {std::move (v)};
461
+ return result_type {std::move (v)};
462
462
}
463
463
default :
464
464
{
@@ -499,7 +499,7 @@ struct decode_traits<T,CharT,
499
499
cursor.array_expected (ec);
500
500
if (JSONCONS_UNLIKELY (ec))
501
501
{
502
- return decode_result {decode_error{ec, cursor.line (), cursor.column ()}};
502
+ return result_type {decode_error{ec, cursor.line (), cursor.column ()}};
503
503
}
504
504
if (cursor.current ().event_type () != staj_event_type::begin_array)
505
505
{
@@ -513,10 +513,10 @@ struct decode_traits<T,CharT,
513
513
while (cursor.current ().event_type () != staj_event_type::end_array && !ec)
514
514
{
515
515
v.insert (decode_traits<value_type,CharT>::try_decode (cursor, decoder, ec));
516
- if (JSONCONS_UNLIKELY (ec)) {return decode_result {decode_error{ec, cursor.line (), cursor.column ()}};}
516
+ if (JSONCONS_UNLIKELY (ec)) {return result_type {decode_error{ec, cursor.line (), cursor.column ()}};}
517
517
// std::cout << "cursor.next 20\n";
518
518
cursor.next (ec);
519
- if (JSONCONS_UNLIKELY (ec)) {return decode_result {decode_error{ec, cursor.line (), cursor.column ()}};}
519
+ if (JSONCONS_UNLIKELY (ec)) {return result_type {decode_error{ec, cursor.line (), cursor.column ()}};}
520
520
}
521
521
return result_type{std::move (v)};
522
522
}
0 commit comments