mirror of
https://github.com/nlohmann/json.git
synced 2026-03-01 06:46:24 +00:00
Fix issue #1237
* Make the conversion operator SFINAE correct. * Workaround a GCC bug with some traits in type_traits.hpp The first bullet-point implies that every `get`/`get_ptr` be SFINAE correct as well.
This commit is contained in:
@@ -811,3 +811,9 @@ TEST_CASE("Issue #924")
|
||||
CHECK_NOTHROW(j.get<Evil>());
|
||||
CHECK_NOTHROW(j.get<std::vector<Evil>>());
|
||||
}
|
||||
|
||||
TEST_CASE("Issue #1237")
|
||||
{
|
||||
struct non_convertible_type {};
|
||||
static_assert(not std::is_convertible<json, non_convertible_type>::value, "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user