From a5f1e4fdec29f13b0f701edf1f356c114f147ca0 Mon Sep 17 00:00:00 2001 From: Ben Deane Date: Tue, 10 Jun 2025 09:42:54 -0600 Subject: [PATCH] :bug: Fix `make_tuple` with function pointers Problem: - Passing a function reference to `make_tuple` does not decay and produce a tuple of a function pointer. Solution: - Use `decay` instead of `remove_cvref`. --- include/stdx/tuple.hpp | 2 +- test/tuple.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/stdx/tuple.hpp b/include/stdx/tuple.hpp index 26298cb..9d09013 100644 --- a/include/stdx/tuple.hpp +++ b/include/stdx/tuple.hpp @@ -444,7 +444,7 @@ template } template [[nodiscard]] constexpr auto make_tuple(Ts &&...ts) { - return tuple...>{std::forward(ts)...}; + return tuple...>{std::forward(ts)...}; } template