Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
add_volatile.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_VOLATILE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_ADD_VOLATILE_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// parasoft-begin-suppress AUTOSAR-A2_11_1-a-2 "This type trait is required to add volatile"
16/// @brief Add @c volatile to the provided type. The @c type member is an alias for the modified type.
17/// @tparam Type The type to add @c volatile to
18template <typename Type>
20 public:
21 /// @brief The resulting type
22 using type = Type volatile;
23};
24// parasoft-end-suppress AUTOSAR-A2_11_1-a-2
25
26/// @brief Add @c volatile to the provided type. An alias for the modified type.
27/// @tparam Type The type to add @c volatile to
28template <typename Type>
29using add_volatile_t = typename add_volatile<Type>::type;
30
31} // namespace std
32
33#endif // INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_ADD_VOLATILE_HPP_
Add volatile to the provided type. The type member is an alias for the modified type.
Definition add_volatile.hpp:19
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