tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
forward_as_tuple.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_TUPLE_FORWARD_AS_TUPLE_HPP
5
#
define
TETL_TUPLE_FORWARD_AS_TUPLE_HPP
6
7
#
include
<
etl
/
_tuple
/
tuple
.
hpp
>
8
#
include
<
etl
/
_utility
/
forward
.
hpp
>
9
10
namespace
etl
{
11
12
/// \brief Constructs a tuple of references to the arguments in args suitable
13
/// for forwarding as an argument to a function. The tuple has rvalue reference
14
/// data members when rvalues are used as arguments, and otherwise has lvalue
15
/// reference data members.
16
template
<
typename
... Args>
17
[[nodiscard]]
constexpr
auto
forward_as_tuple
(Args&&... args)
noexcept
->
etl
::
tuple
<Args&&...>
18
{
19
return
etl
::
tuple
<Args&&...>{
etl
::forward<Args>(args)...};
20
}
21
22
}
// namespace etl
23
24
#
endif
// TETL_TUPLE_FORWARD_AS_TUPLE_HPP
etl
Definition
adjacent_find.hpp:9
etl::forward_as_tuple
constexpr auto forward_as_tuple(Args &&... args) noexcept -> etl::tuple< Args &&... >
Constructs a tuple of references to the arguments in args suitable for forwarding as an argument to a...
Definition
forward_as_tuple.hpp:17
etl::tuple
Definition
tuple.hpp:114
include
etl
_tuple
forward_as_tuple.hpp
Generated on Sun Sep 7 2025 19:15:17 for tetl by
1.9.8