Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
remove_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_REMOVE_CONST_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_REMOVE_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
14namespace std {
15/// @brief remove @c const from the provided type. The @c type member is an alias for the modified type.
16/// @tparam Type The type to remove @c const to
17template <typename Type>
19 public:
20 /// @brief The resulting type
21 using type = Type;
22};
23
24/// @brief remove @c const from the provided type. The @c type member is an alias for the modified type.
25/// @tparam Type The type to remove @c const to
26template <typename Type>
27class remove_const<Type const> {
28 public:
29 /// @brief The resulting type
30 using type = Type;
31};
32
33/// @brief remove @c const from the provided type. An alias for the modified type.
34/// @tparam Type The type to remove @c const to
35template <typename Type>
36using remove_const_t = typename remove_const<Type>::type;
37
38} // namespace std
39
40#endif // INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_REMOVE_CONST_HPP_
remove const from the provided type. The type member is an alias for the modified type.
Definition remove_const.hpp:18
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