* 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:
Théo DELRIEU 2018-09-12 17:01:27 +02:00
parent e4bc98d036
commit 4e52277b70
No known key found for this signature in database
GPG key ID: A5A505438C20539A
4 changed files with 146 additions and 168 deletions

View file

@ -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, "");
}