tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
same_as.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_CONCEPTS_SAME_AS_HPP
5#define TETL_CONCEPTS_SAME_AS_HPP
6
7#include <etl/_type_traits/is_same.hpp>
8
9namespace etl {
10
11namespace detail {
12template <typename T, typename U>
13concept same_helper = etl::is_same_v<T, U>;
14} // namespace detail
15
16/// \brief The concept same_as<T, U> is satisfied if and only if T and U denote
17/// the same type. same_as<T, U> subsumes same_as<U, T> and vice versa.
18/// \ingroup concepts
19template <typename T, typename U>
20concept same_as = detail::same_helper<T, U> and detail::same_helper<U, T>;
21
22} // namespace etl
23
24#endif // TETL_CONCEPTS_SAME_AS_HPP
Definition adjacent_find.hpp:9