21 lines
466 B
C
21 lines
466 B
C
|
#ifndef ALSK_ALSK_EXECUTOR_TRAITS_H
|
||
|
#define ALSK_ALSK_EXECUTOR_TRAITS_H
|
||
|
|
||
|
#include <type_traits>
|
||
|
|
||
|
#include "executorbase.h"
|
||
|
|
||
|
namespace alsk {
|
||
|
|
||
|
template<typename, typename=void> struct IsExecutorImpl: std::false_type {};
|
||
|
|
||
|
template<typename T>
|
||
|
struct IsExecutorImpl<T, std::enable_if_t<std::is_same<typename std::decay_t<T>::IsExecutor, exec::tag::Executor>{}>>: std::true_type {};
|
||
|
|
||
|
template<typename T>
|
||
|
constexpr bool isExecutor = IsExecutorImpl<T>::value;
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|