tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_same.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4#ifndef TETL_TYPE_TRAITS_IS_SAME_HPP
5#define TETL_TYPE_TRAITS_IS_SAME_HPP
6
7#include <etl/_type_traits/bool_constant.hpp>
8
9namespace etl {
10
11/// \brief If T and U name the same type (taking into account const/volatile
12/// qualifications), provides the member constant value equal to true. Otherwise
13/// value is false.
14/// \ingroup type_traits
15template <typename T, typename U>
16struct is_same : false_type { };
17
18/// \ingroup type_traits
19template <typename T>
20struct is_same<T, T> : true_type { };
21
22/// \ingroup type_traits
23template <typename T, typename U>
24inline constexpr bool is_same_v = is_same<T, U>::value;
25
26} // namespace etl
27
28#endif // TETL_TYPE_TRAITS_IS_SAME_HPP
constexpr bool is_same_v
Definition is_same.hpp:24
Definition adjacent_find.hpp:9
If T and U name the same type (taking into account const/volatile qualifications),...
Definition is_same.hpp:16