Exclude test with std::variant when it's unavailable
This commit is contained in:
parent
5a0d8f4ea5
commit
f7f75c8d2a
@ -47,10 +47,6 @@ using nlohmann::json;
|
|||||||
#define JSON_HAS_CPP_17
|
#define JSON_HAS_CPP_17
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef JSON_HAS_CPP_17
|
|
||||||
#include <variant>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "fifo_map.hpp"
|
#include "fifo_map.hpp"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@ -48,7 +48,10 @@ using nlohmann::json;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef JSON_HAS_CPP_17
|
#ifdef JSON_HAS_CPP_17
|
||||||
#include <variant>
|
#if __has_include(<variant>)
|
||||||
|
#define HAS_STD_VARIANT
|
||||||
|
#include <variant>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
@ -247,7 +250,7 @@ TEST_CASE("regression tests 2")
|
|||||||
CHECK(diffs.size() == 1); // Note the change here, was 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")
|
SECTION("issue #1292 - Serializing std::variant causes stack overflow")
|
||||||
{
|
{
|
||||||
static_assert(
|
static_assert(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user