tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
common_with.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_CONCEPTS_COMMON_WITH_HPP
5#define TETL_CONCEPTS_COMMON_WITH_HPP
6
7#include <etl/_concepts/same_as.hpp>
8#include <etl/_type_traits/add_lvalue_reference.hpp>
9#include <etl/_type_traits/common_reference.hpp>
10#include <etl/_type_traits/common_type.hpp>
11#include <etl/_type_traits/declval.hpp>
12
13namespace etl {
14
15// clang-format off
16/// \ingroup concepts
17template <typename T, typename U>
18concept common_with =
20 requires {
21 static_cast<common_type_t<T, U>>(declval<T>());
22 static_cast<common_type_t<T, U>>(declval<U>());
23 } &&
26 add_lvalue_reference_t<U const>> &&
32// clang-format on
33
34} // namespace etl
35
36#endif // TETL_CONCEPTS_COMMON_WITH_HPP
Definition adjacent_find.hpp:9