From c21078caea2d61ee37c60a58b42303c266c75bea Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Wed, 18 Dec 2024 16:25:08 +0100 Subject: [PATCH] Merge pull request #373 from tpadioleau/fix-clang-bracket-issue Improve workaround clang bracket compilation bug --- include/experimental/__p0009_bits/config.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/experimental/__p0009_bits/config.hpp b/include/experimental/__p0009_bits/config.hpp index e8cacf40..a23d0135 100644 --- a/include/experimental/__p0009_bits/config.hpp +++ b/include/experimental/__p0009_bits/config.hpp @@ -242,7 +242,10 @@ static_assert(_MDSPAN_CPLUSPLUS >= MDSPAN_CXX_STD_14, "mdspan requires C++14 or # if defined(__cpp_multidimensional_subscript) // The following if/else is necessary to workaround a clang issue // relative to using a parameter pack inside a bracket operator in C++2b/C++23 mode -# if defined(_MDSPAN_COMPILER_CLANG) && ((__clang_major__ == 15) || (__clang_major__ == 16)) +# if defined(_MDSPAN_COMPILER_CLANG) && \ + ((__clang_major__ < 17) || \ + (__clang_major__ == 17 && __clang_minor__ == 0 && \ + __clang_patchlevel__ == 0)) # define MDSPAN_USE_BRACKET_OPERATOR 0 # else # define MDSPAN_USE_BRACKET_OPERATOR 1