mirror of
https://github.com/nlohmann/json.git
synced 2026-02-26 13:26:28 +00:00
add built-in array support in get_to
This commit is contained in:
@@ -386,6 +386,16 @@ TEST_CASE("value conversion")
|
||||
CHECK(json(a) == j);
|
||||
}
|
||||
|
||||
SECTION("built-in arrays")
|
||||
{
|
||||
const int nbs[] = {0, 1, 2};
|
||||
int nbs2[] = {0, 0, 0};
|
||||
|
||||
json j2 = nbs;
|
||||
j2.get_to(nbs2);
|
||||
CHECK(std::equal(std::begin(nbs), std::end(nbs), std::begin(nbs2)));
|
||||
}
|
||||
|
||||
SECTION("std::deque<json>")
|
||||
{
|
||||
std::deque<json> a{"previous", "value"};
|
||||
|
||||
Reference in New Issue
Block a user