mirror of
https://github.com/nlohmann/json.git
synced 2025-11-24 03:44:06 +08:00
Add to_json() for std::vector<bool>::reference (#3534)
This commit is contained in:
committed by
GitHub
parent
af34396129
commit
9c31d54389
@@ -474,6 +474,13 @@ TEST_CASE("constructors")
|
||||
json j(false);
|
||||
CHECK(j.type() == json::value_t::boolean);
|
||||
}
|
||||
|
||||
SECTION("from std::vector<bool>::refrence")
|
||||
{
|
||||
std::vector<bool> v{true};
|
||||
json j(v[0]);
|
||||
CHECK(j.type() == json::value_t::boolean);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("create a binary (explicit)")
|
||||
|
||||
Reference in New Issue
Block a user