Merge branch 'develop' into feature/manual_lexer

This commit is contained in:
Niels Lohmann 2017-04-04 15:55:40 +02:00
commit 3a34f2d82c
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
2 changed files with 19 additions and 15 deletions

View file

@ -917,6 +917,15 @@ TEST_CASE("value conversion")
}
}
SECTION("get an enum")
{
enum c_enum { value_1, value_2 };
enum class cpp_enum { value_1, value_2 };
CHECK(json(value_1).get<c_enum>() == value_1);
CHECK(json(cpp_enum::value_1).get<cpp_enum>() == cpp_enum::value_1);
}
SECTION("more involved conversions")
{
SECTION("object-like STL containers")