based

Opinionated utility library
git clone git://git.dimitrijedobrota.com/based.git
Log | Files | Refs | README | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING |

commit4cbf30905bd2424e402532141b72ff0d6fc1e8f7
parente40197a1ba5b00fd5924606f51386efdad65fc6f
authorDimitrije Dobrota <mail@dimitrijedobrota.com>
dateThu, 27 Mar 2025 16:27:25 +0100

Fix FreeProcedure detection and handling

Diffstat:
Minclude/based/type_traits.hpp|+++++++++---------

1 files changed, 9 insertions(+), 9 deletions(-)


diff --git a/include/based/type_traits.hpp b/include/based/type_traits.hpp

@@ -41,7 +41,7 @@ namespace detail

{
template<typename Fun>
concept FreeProcedure = std::is_function_v<Fun>;
concept FreeProcedure = std::is_function_v<std::remove_pointer_t<Fun>>;
template<typename Fun>
concept MemberProcedure = std::is_member_function_pointer_v<std::decay_t<Fun>>;

@@ -157,16 +157,16 @@ struct signature<Ret (Obj::*)(Args...) const volatile>

template<typename>
struct domain;
template<FunctorProcedure P>
template<FreeProcedure P>
struct domain<P>
{
using type = signature<decltype(&std::decay_t<P>::operator())>::arg_type;
using type = signature<std::remove_pointer_t<P>>::arg_type;
};
template<FreeProcedure P>
template<FunctorProcedure P>
struct domain<P>
{
using type = signature<P>::arg_type;
using type = signature<decltype(&std::decay_t<P>::operator())>::arg_type;
};
template<MemberProcedure P>

@@ -178,16 +178,16 @@ struct domain<P>

template<typename>
struct codomain;
template<FunctorProcedure P>
template<FreeProcedure P>
struct codomain<P>
{
using type = signature<decltype(&std::decay_t<P>::operator())>::ret_type;
using type = signature<std::remove_pointer_t<P>>::ret_type;
};
template<FreeProcedure P>
template<FunctorProcedure P>
struct codomain<P>
{
using type = signature<P>::ret_type;
using type = signature<decltype(&std::decay_t<P>::operator())>::ret_type;
};
template<MemberProcedure P>