From 55c8b9e5f24b9ff526a59d820a66b428d2774e34 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Sat, 6 Apr 2024 08:14:39 +0200 Subject: [PATCH] Deducing guide for clang --- include/sparrow/allocator.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/sparrow/allocator.hpp b/include/sparrow/allocator.hpp index 2270eb12..ae514081 100644 --- a/include/sparrow/allocator.hpp +++ b/include/sparrow/allocator.hpp @@ -147,9 +147,10 @@ namespace sparrow return std::forward(alloc); } - template - struct overloaded : Ts... { using Ts::operator()...; }; - + template struct overloaded : Ts... { using Ts::operator()...; }; + // Although not required in C++20, clang needs it to build the code below + template overloaded(Ts...) -> overloaded; + storage_type copy_storage(const storage_type& rhs) const { return std::visit(overloaded {