From 436ac7e613d191dccac5187fa61914ebf5fddc0c Mon Sep 17 00:00:00 2001 From: Austin Schuh Date: Wed, 15 Nov 2023 21:32:45 -0800 Subject: [PATCH] Fix with overloading issue with clang 17 In file included from cuco/static_map.cuh:26: In file included from cuco/static_map_ref.cuh:200: cuco/detail/static_map/static_map_ref.inl:152:88: error: __host__ function 'with' cannot overload __host__ __device__ function 'with' 152 | auto static_map_ref::with( | ^ cuco/static_map_ref.cuh:177:42: note: previous declaration is here 177 | [[nodiscard]] __host__ __device__ auto with(NewOperators... ops) && noexcept; | ^ The forward declaration isn't working, just inline it in the header. Signed-off-by: Austin Schuh --- include/cuco/detail/static_map/static_map_ref.inl | 15 --------------- include/cuco/static_map_ref.cuh | 5 ++++- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/include/cuco/detail/static_map/static_map_ref.inl b/include/cuco/detail/static_map/static_map_ref.inl index f27f21e76..e90948f89 100644 --- a/include/cuco/detail/static_map/static_map_ref.inl +++ b/include/cuco/detail/static_map/static_map_ref.inl @@ -141,21 +141,6 @@ static_map_ref return impl_.empty_value_sentinel(); } -template -template -auto static_map_ref::with( - NewOperators...) && noexcept -{ - return static_map_ref( - std::move(*this)); -} - namespace detail { template - [[nodiscard]] __host__ __device__ auto with(NewOperators... ops) && noexcept; + [[nodiscard]] __host__ __device__ auto with(NewOperators...) && noexcept { + return static_map_ref( + std::move(*this)); + } private: impl_type impl_; ///< Static map ref implementation