Exclude test with std::variant when it's unavailable

This commit is contained in:
Alexander Karzhenkov 2020-08-21 19:45:15 +05:00
parent 5a0d8f4ea5
commit f7f75c8d2a
2 changed files with 5 additions and 6 deletions

View File

@ -47,10 +47,6 @@ using nlohmann::json;
#define JSON_HAS_CPP_17
#endif
#ifdef JSON_HAS_CPP_17
#include <variant>
#endif
#include "fifo_map.hpp"
/////////////////////////////////////////////////////////////////////

View File

@ -48,7 +48,10 @@ using nlohmann::json;
#endif
#ifdef JSON_HAS_CPP_17
#include <variant>
#if __has_include(<variant>)
#define HAS_STD_VARIANT
#include <variant>
#endif
#endif
/////////////////////////////////////////////////////////////////////
@ -247,7 +250,7 @@ TEST_CASE("regression tests 2")
CHECK(diffs.size() == 1); // Note the change here, was 2
}
#ifdef JSON_HAS_CPP_17
#ifdef HAS_STD_VARIANT
SECTION("issue #1292 - Serializing std::variant causes stack overflow")
{
static_assert(