2 * Copyright (c) 2023 Philippe Proulx <pproulx@efficios.com>
4 * SPDX-License-Identifier: MIT
7 #ifndef LTTNG_TYPE_TRAITS_HPP
8 #define LTTNG_TYPE_TRAITS_HPP
10 #include <type_traits>
16 * Provides the member constant `value` equal to:
18 * `T` is in the list of types `Ts`:
24 template <typename T, typename... Ts>
25 struct is_one_of : std::false_type {
28 template <typename T, typename... Ts>
29 struct is_one_of<T, T, Ts...> : std::true_type {
32 template <typename T, typename U, typename... Ts>
33 struct is_one_of<T, U, Ts...> : is_one_of<T, Ts...> {
35 } /* namespace traits */
36 } /* namespace lttng */
38 #endif /* LTTNG_TYPE_TRAITS_HPP */