From 4ffe636c303be636399f4849b54b75a52f43d473 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 6 Aug 2024 14:47:55 +1000 Subject: [PATCH] ranges/chunk: remove the clang range_adaptor_closure workaround clang-19 exposes range_adaptor_closure so this isn't necessary. --- cruft/util/ranges/chunk.hpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cruft/util/ranges/chunk.hpp b/cruft/util/ranges/chunk.hpp index 0dbc90f9..d4aae95a 100644 --- a/cruft/util/ranges/chunk.hpp +++ b/cruft/util/ranges/chunk.hpp @@ -219,16 +219,9 @@ namespace cruft::ranges { template chunk_view (R&&, std::ranges::range_difference_t) -> chunk_view>; - // HACK: clang#18 does not expose range_adaptor_closure, so we dig into the internals. -#if defined(COMPILER_GCC) -#define _CRUFT_RANGE_ADAPTOR_BASE std::ranges::range_adaptor_closure -#elif defined(COMPILER_CLANG) -#define _CRUFT_RANGE_ADAPTOR_BASE std::__range_adaptor_closure -#endif - namespace detail { - struct chunk_closure_t : _CRUFT_RANGE_ADAPTOR_BASE { + struct chunk_closure_t : std::ranges::range_adaptor_closure { int n; template