mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
🔨 another try to fix #714
adding std::ios_base::binary when opening all_unicode.json.cbor
This commit is contained in:
@ -6789,7 +6789,7 @@ class json_ref
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
template <class... Args>
|
template <class... Args>
|
||||||
json_ref(Args&&... args)
|
json_ref(Args&& ... args)
|
||||||
: owned_value(std::forward<Args>(args)...),
|
: owned_value(std::forward<Args>(args)...),
|
||||||
value_ref(&owned_value),
|
value_ref(&owned_value),
|
||||||
is_rvalue(true)
|
is_rvalue(true)
|
||||||
|
@ -38,10 +38,10 @@ using nlohmann::json;
|
|||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
struct nocopy
|
struct nocopy
|
||||||
{
|
{
|
||||||
nocopy() = default;
|
nocopy() = default;
|
||||||
nocopy(const nocopy &) = delete;
|
nocopy(const nocopy&) = delete;
|
||||||
|
|
||||||
int val = 0;
|
int val = 0;
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ namespace
|
|||||||
{
|
{
|
||||||
j = {{"val", n.val}};
|
j = {{"val", n.val}};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("regression tests")
|
TEST_CASE("regression tests")
|
||||||
@ -1270,7 +1270,6 @@ TEST_CASE("regression tests")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
SECTION("issue #714 - throw std::ios_base::failure exception when failbit set to true")
|
SECTION("issue #714 - throw std::ios_base::failure exception when failbit set to true")
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@ -1293,11 +1292,11 @@ TEST_CASE("regression tests")
|
|||||||
| std::ios_base::badbit
|
| std::ios_base::badbit
|
||||||
); // handle different exceptions as 'file not found', 'permission denied'
|
); // handle different exceptions as 'file not found', 'permission denied'
|
||||||
|
|
||||||
is.open("test/data/json_nlohmann_tests/all_unicode.json.cbor");
|
is.open("test/data/json_nlohmann_tests/all_unicode.json.cbor",
|
||||||
|
std::ios_base::in | std::ios_base::binary);
|
||||||
CHECK_NOTHROW(nlohmann::json::from_cbor(is));
|
CHECK_NOTHROW(nlohmann::json::from_cbor(is));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
SECTION("issue #805 - copy constructor is used with std::initializer_list constructor.")
|
SECTION("issue #805 - copy constructor is used with std::initializer_list constructor.")
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user