Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
make_tuple.hpp
Go to the documentation of this file.
1
// Copyright 2026, Toyota Motor Corporation
2
//
3
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5
#
ifndef
INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_MAKE_TUPLE_HPP_
6
#
define
INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_MAKE_TUPLE_HPP_
7
8
// IWYU pragma: private, include <tuple>
9
// IWYU pragma: friend "stdlib_detail/.*"
10
11
// parasoft-begin-suppress CERT_CPP-DCL58-a-2 "Part of a standard library implementation"
12
// parasoft-begin-suppress AUTOSAR-A17_6_1-a-2 "Part of a standard library implementation"
13
14
#
include
"arene/base/type_traits/unwrap_reference.hpp"
15
#
include
"stdlib/include/stdlib_detail/forward.hpp"
16
// parasoft-begin-suppress AUTOSAR-A16_2_2-a "False positive: needed for tuple definition."
17
#
include
"stdlib/include/stdlib_detail/tuple.hpp"
18
// parasoft-end-suppress AUTOSAR-A16_2_2-a
19
20
namespace
std
{
21
22
// parasoft-begin-suppress CERT_C-EXP37-a "False-positive: All arguments are named"
23
/// @brief construct a tuple with types deduced from the provided arguments
24
/// @tparam Types types of the tuple members, deduced from @c args
25
/// @param args a pack of values used to initialize the tuple
26
/// @return A @c tuple with contents initialized using @c args
27
/// @note Tuple member types are deduced as value types, not references, unless
28
/// passed in as @c reference_wrapper instances
29
template
<
class
...
Types
>
30
constexpr
auto
make_tuple
(
Types
&&...
args
31
)
noexcept
(
noexcept
(
tuple
<
arene
::
base
::
unwrap_ref_decay_t
<
Types
>...>(
std
::
forward
<
Types
>(
args
)...)))
32
->
tuple
<
arene
::
base
::
unwrap_ref_decay_t
<
Types
>...> {
33
return
tuple
<
arene
::
base
::
unwrap_ref_decay_t
<
Types
>...>(
std
::
forward
<
Types
>(
args
)...);
34
}
35
// parasoft-end-suppress CERT_C-EXP37-a
36
37
}
// namespace std
38
39
#
endif
// INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_MAKE_TUPLE_HPP_
std::hash<::arene::base::result< void, E > >::operator()
constexpr auto operator()(::arene::base::result< void, E > const &value) const noexcept(noexcept(hash< E >{}(std::declval< E const & >()))) -> std::size_t
Calculate the hash of a result.
Definition
result.hpp:1827
stdlib
include
stdlib_detail
make_tuple.hpp
Generated by
1.13.2