mirror of
https://github.com/nlohmann/json.git
synced 2026-07-11 21:15:10 +00:00
Fix ci_icpc: exclude classic ICC from the std::span regression test
Bumping to Intel's official intel/oneapi-hpckit:2023.2.1 image (see previous commit) also bumped classic icc/icpc from 2021.5.0 to 2021.10.0. The newer version's __has_include(<span>) now returns true, but it still can't actually compile std::span/std::as_bytes usage: error: namespace "std" has no member "as_bytes" error: namespace "std" has no member "span" Exclude __ICC/__INTEL_COMPILER the same way _LIBCPP_VERSION is already excluded for issue #4490. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -798,7 +798,9 @@ TEST_CASE("regression tests 2")
|
||||
|
||||
#ifdef JSON_HAS_CPP_20
|
||||
#ifndef _LIBCPP_VERSION // see https://github.com/nlohmann/json/issues/4490
|
||||
#if __has_include(<span>)
|
||||
// classic Intel ICC reports <span> as includable but cannot actually compile
|
||||
// std::span/std::as_bytes usage below
|
||||
#if __has_include(<span>) && !defined(__ICC) && !defined(__INTEL_COMPILER)
|
||||
SECTION("issue #2546 - parsing containers of std::byte")
|
||||
{
|
||||
const char DATA[] = R"("Hello, world!")"; // NOLINT(misc-const-correctness,cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
|
||||
|
||||
Reference in New Issue
Block a user