From 6e4552e653bef2b62525a6d66d127ae5fb9dadd9 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sun, 15 Feb 2026 04:24:20 +0900 Subject: [PATCH] Suppress warning --- CMakeLists.txt | 7 ++++++- include/iris/type_traits.hpp | 8 +------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1451fa4..94d6d05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,7 +133,12 @@ if(MSVC) ) else() if(CMAKE_CXX_COMPILER_ID MATCHES Clang) - target_compile_options(_iris_cxx_common INTERFACE -fno-builtin-std-forward_like) + target_compile_options( + _iris_cxx_common + INTERFACE + -fno-builtin-std-forward_like + -Wno-c++26-extensions # workaround for warnings emitted when using pack indexing + ) endif() target_compile_options( _iris_cxx_common diff --git a/include/iris/type_traits.hpp b/include/iris/type_traits.hpp index 3d9d008..b20d977 100644 --- a/include/iris/type_traits.hpp +++ b/include/iris/type_traits.hpp @@ -57,10 +57,6 @@ template using at_c_t = at_c::type; #if __cpp_pack_indexing >= 202311L // has native pack indexing -# if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wc++26-extensions" -# endif # define IRIS_CORE_PACK_INDEXING(I, Ts_ellipsis) Ts_ellipsis[I] @@ -74,9 +70,7 @@ struct at_c> { using type = Ts...[I]; }; -# if defined(__clang__) -# pragma clang diagnostic pop -# endif + // ---------------------------------------------------------- #else // no native pack indexing template