🔥 removed deprecated constructor #480

The constructor basic_json(std::istream&, const parser_callback_t) has
been deprecated since version 2.0.0. This commit removes it together
with its code example, deprecation macro, and test cases. The code now
also compiles with -W-deprecated-declarations.
This commit is contained in:
Niels Lohmann 2017-03-01 17:49:03 +01:00
parent 6b3912d936
commit 7b8fd864e2
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
7 changed files with 0 additions and 218 deletions

View file

@ -1281,40 +1281,4 @@ TEST_CASE("constructors")
}
}
}
SECTION("create a JSON value from an input stream")
{
SECTION("std::stringstream")
{
std::stringstream ss;
ss << "[\"foo\",1,2,3,false,{\"one\":1}]";
json j(ss);
CHECK(j == json({"foo", 1, 2, 3, false, {{"one", 1}}}));
}
SECTION("with callback function")
{
std::stringstream ss;
ss << "[\"foo\",1,2,3,false,{\"one\":1}]";
json j(ss, [](int, json::parse_event_t, const json & val)
{
// filter all number(2) elements
if (val == json(2))
{
return false;
}
else
{
return true;
}
});
CHECK(j == json({"foo", 1, 3, false, {{"one", 1}}}));
}
SECTION("std::ifstream")
{
std::ifstream f("test/data/json_tests/pass1.json");
json j(f);
}
}
}