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
13
namespace
etl
{
14
15
// clang-format off
16
/// \ingroup concepts
17
template
<
typename
T
,
typename
U
>
18
concept
common_with
=
19
same_as
<
common_type_t
<
T
,
U
>,
common_type_t
<
U
,
T
>> &&
20
requires
{
21
static_cast
<
common_type_t
<
T
,
U
>>(
declval
<
T
>());
22
static_cast
<
common_type_t
<
T
,
U
>>(
declval
<
U
>());
23
} &&
24
common_reference_with
<
25
add_lvalue_reference_t
<
T
const
>,
26
add_lvalue_reference_t
<
U
const
>> &&
27
common_reference_with
<
28
add_lvalue_reference_t
<
common_type_t
<
T
,
U
>>,
29
common_reference_t
<
30
add_lvalue_reference_t
<
T
const
>,
31
add_lvalue_reference_t
<
U
const
>>>;
32
// clang-format on
33
34
}
// namespace etl
35
36
#
endif
// TETL_CONCEPTS_COMMON_WITH_HPP
etl
Definition
adjacent_find.hpp:9
include
etl
_concepts
common_with.hpp
Generated on Sun Sep 7 2025 19:14:53 for tetl by
1.9.8