summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-01-08 05:10:44 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-01-08 05:10:44 +0100
commit7f42651fdd5a7d575ffdde89c369fe28cad2ced5 (patch)
tree433354042a0d32a21c8168fa155079b7718fe077 /compat
parent3370445a2e22ee00687ecef2e9dc88f47bb2b4c6 (diff)
a
Diffstat (limited to 'compat')
-rw-r--r--compat/map.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/compat/map.hpp b/compat/map.hpp
index def97d0e..9bcceadb 100644
--- a/compat/map.hpp
+++ b/compat/map.hpp
@@ -17,9 +17,9 @@ constexpr auto map0(const std::array<T, N>& array, const F& fun, std::index_sequ
template<typename T, typename F>
[[deprecated("zero-length array!")]]
CORRADE_ALWAYS_INLINE
-constexpr auto map0(const std::array<T, 0>&, const F& fun, std::index_sequence<>)
+constexpr auto map0(const std::array<T, 0>&, const F&, std::index_sequence<>)
{
- return std::array<std::decay_t<decltype( fun(std::declval<const T&>()) )> , 0>{};
+ return std::array<std::decay_t<std::invoke_result_t<std::decay_t<F>, const std::remove_cvref_t<T>&>>, 0>{};
}
} // namespace floormat::detail::map