Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
remove_reference.hpp
Go to the documentation of this file.
1
// Copyright 2024, 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_REMOVE_REFERENCE_HPP_
6
#
define
INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_REMOVE_REFERENCE_HPP_
7
8
// parasoft-begin-suppress CERT_CPP-DCL58-a-2 "Part of a standard library implementation"
9
// parasoft-begin-suppress AUTOSAR-A17_6_1-a-2 "Part of a standard library implementation"
10
11
// IWYU pragma: private, include <type_traits>
12
// IWYU pragma: friend "stdlib_detail/.*"
13
14
namespace
std
{
15
/// @brief The @c type member is an alias for @c T, but with top-level reference qualifiers removed
16
/// @tparam T The type to remove the reference qualifiers from
17
template
<
typename
T>
18
class
remove_reference
{
19
public
:
20
/// @brief The resulting type
21
using
type = T;
22
};
23
24
/// @brief The @c type member is an alias for @c T, but with top-level reference qualifiers removed
25
/// @tparam T The type to remove the reference qualifiers from
26
template
<
typename
T>
27
class
remove_reference
<T&> {
28
public
:
29
/// @brief The resulting type
30
using
type = T;
31
};
32
33
/// @brief The @c type member is an alias for @c T, but with top-level reference qualifiers removed
34
/// @tparam T The type to remove the reference qualifiers from
35
template
<
typename
T>
36
class
remove_reference
<T&&> {
37
public
:
38
/// @brief The resulting type
39
using
type = T;
40
};
41
42
// parasoft-begin-suppress AUTOSAR-A2_10_1-e "False positive: 'remove_reference_t' does not hide an identifier in
43
// 'tuple_leaf'"
44
/// @brief An alias for @c T, but with top-level reference qualifiers removed
45
/// @tparam T The type to remove the reference qualifiers from
46
template
<
typename
T>
47
using
remove_reference_t =
typename
remove_reference
<T>::type;
48
// parasoft-end-suppress AUTOSAR-A2_10_1-e
49
50
}
// namespace std
51
52
#
endif
// INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_REMOVE_REFERENCE_HPP_
std::remove_reference
The type member is an alias for T, but with top-level reference qualifiers removed.
Definition
remove_reference.hpp:18
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
remove_reference.hpp
Generated by
1.13.2