diff options
Diffstat (limited to 'src/DI/type_traits.hpp')
-rw-r--r-- | src/DI/type_traits.hpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/DI/type_traits.hpp b/src/DI/type_traits.hpp index e4b6640..6847c4f 100644 --- a/src/DI/type_traits.hpp +++ b/src/DI/type_traits.hpp @@ -1,16 +1,18 @@ #pragma once +#include "DI/factory.hpp" + #include <type_traits> -template <typename NotAFunc> -struct is_func : public std::false_type // NOLINT(readability-identifier-naming) +template <typename NotAFunction> +struct is_factory : public std::false_type // NOLINT(readability-identifier-naming) { }; template <typename Return, typename... Args> -struct is_func<Return (*)(Args...)> : public std::true_type +struct is_factory<Factory<Return(Args...)>> : public std::true_type { }; -template <typename PossiblyFunc> -inline constexpr bool is_func_v = is_func<PossiblyFunc>::value; +template <typename PossiblyFunction> +inline constexpr bool is_factory_v = is_factory<PossiblyFunction>::value; |