diff --git a/types/traits.hpp b/types/traits.hpp index 2ef637f3..0ca8b96d 100644 --- a/types/traits.hpp +++ b/types/traits.hpp @@ -129,22 +129,62 @@ using remove_restrict_t = typename remove_restrict::type; /////////////////////////////////////////////////////////////////////////////// /// removes the noexcept type specifier from invokable types -template -struct remove_noexcept -{ using type = T; }; +namespace detail { + template + struct remove_noexcept + { using type = T; }; -//----------------------------------------------------------------------------- -template -struct remove_noexcept { - using type = ResultT(&)(Args...); + //------------------------------------------------------------------------- + template + struct remove_noexcept { + using type = ResultT(&)(Args...); + }; + + + //------------------------------------------------------------------------- + template + struct remove_noexcept { + using type = ResultT(*const)(Args...); + }; + + + //------------------------------------------------------------------------- + template + struct remove_noexcept { + using type = ResultT(*)(Args...); + }; + + + //------------------------------------------------------------------------- + template + struct remove_noexcept { + using type = ResultT(ClassT::*)(Args...); + }; + + + //------------------------------------------------------------------------- + template + struct remove_noexcept { + using type = ResultT(ClassT::*)(Args...) const; + }; }; //----------------------------------------------------------------------------- -template -struct remove_noexcept { - using type = ResultT(*)(Args...); +template +struct remove_noexcept : public detail::remove_noexcept { }; + +//----------------------------------------------------------------------------- +template +using remove_noexcept_t = typename remove_noexcept::type; + + +/////////////////////////////////////////////////////////////////////////////// +/// removes any `const' qualifier from the supplied member function +template +struct remove_member_const { + using type = FuncT; };