From 46b371e7c5298cfe36a59ac5108a718b6214decc Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 29 Apr 2022 20:48:51 +0200 Subject: fix: move not null_null position in factory header --- include/yacppdic/factory.hpp | 53 ++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/include/yacppdic/factory.hpp b/include/yacppdic/factory.hpp index 368175a..6de47d8 100644 --- a/include/yacppdic/factory.hpp +++ b/include/yacppdic/factory.hpp @@ -19,29 +19,7 @@ namespace yacppdic template class Factory; -template -// NOLINTNEXTLINE(readability-identifier-naming) -struct maybe_derive_from_unary_function -{ -}; - -template -struct maybe_derive_from_unary_function - : public std::unary_function -{ -}; - -template -// NOLINTNEXTLINE(readability-identifier-naming) -struct maybe_derive_from_binary_function -{ -}; - -template -struct maybe_derive_from_binary_function - : public std::binary_function -{ -}; +} template auto not_null(Function const & /*unused*/) -> bool @@ -62,11 +40,38 @@ auto not_null(Return Class::*method_ptr) -> bool } template -auto not_null(Factory const &factory) -> bool +auto not_null(yacppdic::Factory const &factory) -> bool { return !!factory; } +namespace yacppdic +{ + +template +// NOLINTNEXTLINE(readability-identifier-naming) +struct maybe_derive_from_unary_function +{ +}; + +template +struct maybe_derive_from_unary_function + : public std::unary_function +{ +}; + +template +// NOLINTNEXTLINE(readability-identifier-naming) +struct maybe_derive_from_binary_function +{ +}; + +template +struct maybe_derive_from_binary_function + : public std::binary_function +{ +}; + template concept Callable = !std::is_same_v< -- cgit v1.2.3-18-g5258