aboutsummaryrefslogtreecommitdiff
path: root/src/support/type/filter.h
blob: 4a0e19f53036f2cca0ed41342d808d8af3a8102a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef INPUTXSLT_SRC_SUPPORT_TYPE_FILTER_H_
#define INPUTXSLT_SRC_SUPPORT_TYPE_FILTER_H_

#include <tuple>
#include <type_traits>

namespace InputXSLT {

template <
	typename BaseReference,
	typename Head,
	typename... Tail
>
struct filter_derived {
	typedef typename std::conditional<
		std::is_base_of<BaseReference, Head>::value,
		std::tuple<Head, Tail...>,
		std::tuple<Tail...>
	>::type type;
};

}

#endif  // INPUTXSLT_SRC_SUPPORT_TYPE_FILTER_H_