Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
add_const.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_ADD_CONST_HPP_
6
#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_ADD_CONST_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 Add @c const to the provided type. The @c type member is an alias for the modified type.
16
/// @tparam Type The type to add @c const to
17
template
<
typename
Type>
18
class
add_const
{
19
public
:
20
/// @brief The resulting type
21
using
type
= Type
const
;
22
};
23
24
/// @brief Add @c const to the provided type. An alias for the modified type.
25
/// @tparam Type The type to add @c const to
26
template
<
typename
Type>
27
using
add_const_t
=
typename
add_const<Type>::type
;
28
29
}
// namespace std
30
31
#endif
// INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_ADD_CONST_HPP_
std::add_const
Add const to the provided type. The type member is an alias for the modified type.
Definition
add_const.hpp:18
std::add_const::type
Type const type
The resulting type.
Definition
add_const.hpp:21
std
STL namespace.
std::add_const_t
typename add_const< Type >::type add_const_t
Add const to the provided type. An alias for the modified type.
Definition
add_const.hpp:27
stdlib
include
stdlib_detail
add_const.hpp
Generated by
1.13.2