tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
decay_copy.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_RANGES_DECAY_COPY_HPP
5
#
define
TETL_RANGES_DECAY_COPY_HPP
6
7
#
include
<
etl
/
_type_traits
/
decay
.
hpp
>
8
#
include
<
etl
/
_type_traits
/
is_nothrow_convertible
.
hpp
>
9
#
include
<
etl
/
_utility
/
forward
.
hpp
>
10
11
namespace
etl
{
12
13
/// \ingroup ranges
14
template
<
typename
T>
15
constexpr
auto
decay_copy
(T&& t)
noexcept
(
is_nothrow_convertible_v
<
T
,
decay_t
<
T
>>) -> decay_t<T>
16
{
17
return
etl
::forward<T>(t);
18
}
19
20
}
// namespace etl
21
22
#
endif
// TETL_RANGES_DECAY_COPY_HPP
etl::decay_copy
constexpr auto decay_copy(T &&t) noexcept(is_nothrow_convertible_v< T, decay_t< T > >) -> decay_t< T >
Definition
decay_copy.hpp:15
etl
Definition
adjacent_find.hpp:9
include
etl
_ranges
decay_copy.hpp
Generated on Sun Sep 7 2025 19:15:16 for tetl by
1.9.8