💄 cleanup after #508

parent 773b33e0
This diff is collapsed.
...@@ -802,8 +802,9 @@ template <typename BasicJsonType, typename T, std::size_t N, ...@@ -802,8 +802,9 @@ template <typename BasicJsonType, typename T, std::size_t N,
enable_if_t<not std::is_constructible< enable_if_t<not std::is_constructible<
typename BasicJsonType::string_t, T (&)[N]>::value, typename BasicJsonType::string_t, T (&)[N]>::value,
int> = 0> int> = 0>
void to_json(BasicJsonType &j, T (&arr)[N]) { void to_json(BasicJsonType& j, T (&arr)[N])
external_constructor<value_t::array>::construct(j, arr); {
external_constructor<value_t::array>::construct(j, arr);
} }
/////////////// ///////////////
......
...@@ -192,16 +192,16 @@ TEST_CASE("value conversion") ...@@ -192,16 +192,16 @@ TEST_CASE("value conversion")
SECTION("built-in arrays") SECTION("built-in arrays")
{ {
const char str[] = "a string"; const char str[] = "a string";
const int nbs[] = {0, 1, 2}; const int nbs[] = {0, 1, 2};
json j2 = nbs; json j2 = nbs;
json j3 = str; json j3 = str;
auto v = j2.get<std::vector<int>>(); auto v = j2.get<std::vector<int>>();
auto s = j3.get<std::string>(); auto s = j3.get<std::string>();
CHECK(std::equal(v.begin(), v.end(), std::begin(nbs))); CHECK(std::equal(v.begin(), v.end(), std::begin(nbs)));
CHECK(s == str); CHECK(s == str);
} }
SECTION("std::deque<json>") SECTION("std::deque<json>")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment