rosa/inc/alsk/executor/traits.h

21 lines
466 B
C
Raw Permalink Normal View History

2021-05-10 16:14:24 +00:00
#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