Skip to content

Commit c8b4e43

Browse files
author
Galas' Sergey
committed
core: function_traits noexcept specializations
starting from 17th standard noexcept-specification is a part of the function type. function_traits doesn't have specializations for noexcept function types thus cannot resolve the traits. adding noexcept specializations allows function_traits for a larger class of function types fi noexcept future exception continuations. seastar supports 20th standard and newer thus there is no need to worry about compatibility.
1 parent 5b95d1d commit c8b4e43

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/seastar/core/function_traits.hh

+12
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ template <typename T, typename Ret, typename... Args>
5757
struct function_traits<Ret(T::*)(Args...) const> : public function_traits<Ret(Args...)>
5858
{};
5959

60+
template<typename Ret, typename... Args>
61+
struct function_traits<Ret(*)(Args...) noexcept> : public function_traits<Ret(Args...)>
62+
{};
63+
64+
template <typename T, typename Ret, typename... Args>
65+
struct function_traits<Ret(T::*)(Args...) noexcept> : public function_traits<Ret(Args...)>
66+
{};
67+
68+
template <typename T, typename Ret, typename... Args>
69+
struct function_traits<Ret(T::*)(Args...) const noexcept> : public function_traits<Ret(Args...)>
70+
{};
71+
6072
template <typename T>
6173
struct function_traits : public function_traits<decltype(&T::operator())>
6274
{};

0 commit comments

Comments
 (0)