Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
remove_cvref.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_ARENE_BASE_TYPE_TRAITS_REMOVE_CVREF_HPP_
6
#
define
INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_REMOVE_CVREF_HPP_
7
8
// IWYU pragma: private, include "arene/base/type_traits.hpp"
9
// IWYU pragma: friend "(arene/base(?!/tests)|stdlib/include/stdlib_detail)/.*"
10
11
#
include
"arene/base/stdlib_choice/remove_cv.hpp"
12
#
include
"arene/base/stdlib_choice/remove_reference.hpp"
13
14
namespace
arene
{
15
namespace
base
{
16
17
/// @brief Backport of std::remove_cv_t
18
/// @tparam T The source type
19
// parasoft-begin-suppress AUTOSAR-A2_7_3 "False positive: documented"
20
template
<
typename
T
>
21
using
remove_cv_t
=
typename
std
::
remove_cv
<
T
>::
type
;
22
// parasoft-end-suppress AUTOSAR-A2_7_3
23
24
/// @brief Backport of std::remove_reference_t
25
/// @tparam T The source type
26
// parasoft-begin-suppress AUTOSAR-A2_7_3 "False positive: documented"
27
template
<
typename
T
>
28
using
remove_reference_t
=
typename
std
::
remove_reference
<
T
>::
type
;
29
// parasoft-end-suppress AUTOSAR-A2_7_3
30
31
/// @brief Backport of std::remove_cvref_t
32
/// @tparam T The source type
33
// parasoft-begin-suppress AUTOSAR-A2_7_3 "False positive: documented"
34
template
<
typename
T
>
35
using
remove_cvref_t
=
remove_cv_t
<
remove_reference_t
<
T
>>;
36
// parasoft-end-suppress AUTOSAR-A2_7_3
37
38
/// @brief Backport of std::remove_cvref
39
/// @tparam T The source type
40
// parasoft-begin-suppress AUTOSAR-A2_7_3 "False positive: documented"
41
template
<
typename
T>
42
class
remove_cvref {
43
public
:
44
/// @brief result type
45
using
type = remove_cvref_t<T>;
46
};
47
// parasoft-end-suppress AUTOSAR-A2_7_3
48
49
}
// namespace base
50
}
// namespace arene
51
52
#
endif
// INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_REMOVE_CVREF_HPP_
arene::base
Definition
array_exceptions_disabled.cpp:11
arene
Copyright 2026, Toyota Motor Corporation.
Definition
array_exceptions_disabled.cpp:10
arene
base
type_traits
remove_cvref.hpp
Generated by
1.13.2