tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_specialized.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2021 Tobias Hienzsch
3
4#ifndef TETL_TYPE_TRAITS_IS_SPECIALIZED_HPP
5#define TETL_TYPE_TRAITS_IS_SPECIALIZED_HPP
6
7#include <etl/_type_traits/bool_constant.hpp>
8#include <etl/_type_traits/void_t.hpp>
9
10namespace etl {
11
12template <template <typename...> typename, typename, typename = void>
13struct is_specialized : false_type { };
14
15template <template <typename...> typename Template, typename T>
16struct is_specialized<Template, T, void_t<decltype(Template<T>{})>> : true_type { };
17
18template <template <typename...> typename Template, typename T, typename Tag = void>
19inline constexpr bool is_specialized_v = is_specialized<Template, T, Tag>::value;
20
21} // namespace etl
22
23#endif // TETL_TYPE_TRAITS_IS_SPECIALIZED_HPP
Definition adjacent_find.hpp:9
constexpr bool is_specialized_v
Definition is_specialized.hpp:19
Definition is_specialized.hpp:13