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
3#ifndef TETL_CONCEPTS_COMMON_WITH_HPP
4#define TETL_CONCEPTS_COMMON_WITH_HPP
5
11
12namespace etl {
13
14// clang-format off
16template <typename T, typename U>
17concept common_with =
19 requires {
20 static_cast<common_type_t<T, U>>(declval<T>());
21 static_cast<common_type_t<T, U>>(declval<U>());
22 } &&
24 add_lvalue_reference_t<T const>,
25 add_lvalue_reference_t<U const>> &&
27 add_lvalue_reference_t<common_type_t<T, U>>,
29 add_lvalue_reference_t<T const>,
30 add_lvalue_reference_t<U const>>>;
31// clang-format on
32
33} // namespace etl
34
35#endif // TETL_CONCEPTS_COMMON_WITH_HPP
Definition common_reference_with.hpp:16
Definition common_with.hpp:17
The concept same_as<T, U> is satisfied if and only if T and U denote the same type....
Definition same_as.hpp:19
Definition adjacent_find.hpp:8
auto declval() noexcept -> add_rvalue_reference_t< T >
typename common_type< T... >::type common_type_t
Definition common_type.hpp:50
typename common_reference< T... >::type common_reference_t
Definition common_reference.hpp:38