MCPcopy Create free account
hub / github.com/bitfieldaudio/OTTO / from_json_array_impl

Function from_json_array_impl

external/include/json.hpp:1180–1191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1178
1179template<typename BasicJsonType, typename CompatibleArrayType>
1180void from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<0> /*unused*/)
1181{
1182 using std::end;
1183
1184 std::transform(j.begin(), j.end(),
1185 std::inserter(arr, end(arr)), [](const BasicJsonType & i)
1186 {
1187 // get<BasicJsonType>() returns *this, this won't call a from_json
1188 // method when value_type is BasicJsonType
1189 return i.template get<typename CompatibleArrayType::value_type>();
1190 });
1191}
1192
1193template<typename BasicJsonType, typename CompatibleArrayType>
1194auto from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<1> /*unused*/)

Callers 1

from_jsonFunction · 0.85

Calls 5

endFunction · 0.70
transformFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected