From a81321129785ca739979da34665dceb6d1da2120 Mon Sep 17 00:00:00 2001 From: Richard Biely Date: Sat, 2 Mar 2024 01:10:14 +0400 Subject: [PATCH] Fixed: Broken member function detection --- include/gaia/core/utility.h | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/include/gaia/core/utility.h b/include/gaia/core/utility.h index d89d5cad..b54b3c6f 100644 --- a/include/gaia/core/utility.h +++ b/include/gaia/core/utility.h @@ -282,17 +282,36 @@ namespace gaia { template func_type_list func_args(Ret (Class::*)(Args...) const); + namespace detail { + template class Op, class... Args> + struct detector { + using value_t = std::false_type; + using type = Default; + }; + + template class Op, class... Args> + struct detector>, Op, Args...> { + using value_t = std::true_type; + using type = Op; + }; + + struct nonesuch { + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + void operator=(nonesuch const&) = delete; + }; + } // namespace detail + + template