Adiar 2.1.0
An External Memory Decision Diagram Library
Loading...
Searching...
No Matches
type_traits.h
1#ifndef ADIAR_TYPE_TRAITS_H
2#define ADIAR_TYPE_TRAITS_H
3
4#include <type_traits>
5
6namespace adiar
7{
8 template <bool Condition, typename Type = void>
9 using enable_if = typename std::enable_if<Condition, Type>::type;
10
11 template <typename A, typename B>
12 inline constexpr bool is_convertible = std::is_convertible<A, B>::value;
13
14 template <typename A, typename B>
15 inline constexpr bool is_same = std::is_same<A, B>::value;
16
17 template <typename A, typename B>
18 inline constexpr bool needs_conversion = !is_same<A, B> && is_convertible<A, B>;
19
20 template <typename A>
21 inline constexpr bool is_const = std::is_const<std::remove_reference_t<A>>::value;
22
23 template <typename A>
24 inline constexpr bool is_mutable = !is_const<A>;
25
26 template <typename A>
27 inline constexpr bool is_integral = std::is_integral<A>::value;
28}
29
30#endif // ADIAR_TYPE_TRAITS_H
consumer< ValueType > make_consumer(OutputIt &iter)
Wrap an iterator into a consumer function.
Definition functional.h:67
Core types.
Definition adiar.h:40