2 * Copyright (c) 2023 Philippe Proulx <pproulx@efficios.com>
4 * SPDX-License-Identifier: MIT
7 #ifndef BABELTRACE_CPP_COMMON_BT2C_TYPE_TRAITS_HPP
8 #define BABELTRACE_CPP_COMMON_BT2C_TYPE_TRAITS_HPP
10 #include <type_traits>
15 * Provides the member constant `value` equal to:
17 * `T` is in the list of types `Ts`:
23 template <typename T, typename... Ts>
24 struct IsOneOf : std::false_type
28 template <typename T, typename... Ts>
29 struct IsOneOf<T, T, Ts...> : std::true_type
33 template <typename T, typename U, typename... Ts>
34 struct IsOneOf<T, U, Ts...> : IsOneOf<T, Ts...>
38 } /* namespace bt2c */
40 #endif /* BABELTRACE_CPP_COMMON_BT2C_TYPE_TRAITS_HPP */