aboutsummaryrefslogtreecommitdiff
path: root/src/DI/type_traits.hpp
blob: a852a4f39161ca101fff046689edf5ae2ffa869a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include <functional>

template <typename NotAFunc>
struct is_func : public std::false_type // NOLINT(readability-identifier-naming)
{
};

template <typename Return, typename... Args>
struct is_func<std::function<Return(Args...)>> : public std::true_type
{
};

template <typename PossiblyFunc>
inline constexpr bool is_func_v = is_func<PossiblyFunc>::value;