tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
make_tuple.hpp
Go to the documentation of this file.
1
2
3// SPDX-License-Identifier: BSL-1.0
4
5#ifndef TETL_TUPLE_MAKE_TUPLE_HPP
6#define TETL_TUPLE_MAKE_TUPLE_HPP
7
12
13namespace etl {
14namespace detail {
15template <typename T>
16struct unwrap_refwrapper {
17 using type = T;
18};
19
20template <typename T>
21struct unwrap_refwrapper<reference_wrapper<T>> {
22 using type = T&;
23};
24
25template <typename T>
26using unwrap_decay_t = typename unwrap_refwrapper<decay_t<T>>::type;
27
28} // namespace detail
29
32template <typename... Args>
33[[nodiscard]] constexpr auto make_tuple(Args&&... args)
34{
36}
37} // namespace etl
38
39#endif // TETL_TUPLE_MAKE_TUPLE_HPP
Definition adjacent_find.hpp:8
reference_wrapper(T &) -> reference_wrapper< T >
constexpr auto make_tuple(Args &&... args)
Creates a tuple object, deducing the target type from the types of arguments.
Definition make_tuple.hpp:33
constexpr auto forward(remove_reference_t< T > &param) noexcept -> T &&
Forwards lvalues as either lvalues or as rvalues, depending on T. When t is a forwarding reference (a...
Definition forward.hpp:18
Definition tuple.hpp:107