From cc9908e5159ed93a18eda9f9794a7c9fc7f67f27 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 23 Jan 2022 10:34:38 +0100 Subject: Fix visit() return type It's too restrictive compared to switchOnType() overloads and doesn't map to the case with a default value. --- lib/events/event.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/events') diff --git a/lib/events/event.h b/lib/events/event.h index f10f6a8d..113fa3fa 100644 --- a/lib/events/event.h +++ b/lib/events/event.h @@ -354,8 +354,7 @@ switchOnType(const BaseT& event, FnT1&& fn1, FnT2&& fn2, FnTs&&... fns) template [[deprecated("The new name for visit() is switchOnType()")]] // -inline std::common_type_t...> -visit(const BaseT& event, FnTs&&... fns) +inline auto visit(const BaseT& event, FnTs&&... fns) { return switchOnType(event, std::forward(fns)...); } -- cgit v1.2.3