Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
is_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_IS_VOLATILE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_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
14#include "stdlib/include/stdlib_detail/integral_constant.hpp"
15
16namespace std {
17
18/// @brief A type trait to check if a type is @c volatile. The value is @c true if @c Type is @c volatile, @c false
19/// otherwise.
20/// @tparam Type The type to check
21template <typename Type>
22extern constexpr bool is_volatile_v = false;
23
24// parasoft-begin-suppress AUTOSAR-A2_11_1-a-2 "This type trait is required to use volatile"
25/// @brief A type trait to check if a type is @c volatile. The value is @c true if @c Type is @c volatile, @c false
26/// otherwise.
27/// @tparam Type The type to check, without @c volatile
28template <typename Type>
29extern constexpr bool is_volatile_v<Type volatile> = true;
30// parasoft-end-suppress AUTOSAR-A2_11_1-a-2
31
32/// @brief A type trait to check if a type is @c volatile. The class is derived from @c true_type if @c Type is @c
33/// volatile,
34/// @c false_type otherwise.
35/// @tparam Type The type to check
36template <typename Type>
38
39} // namespace std
40
41#endif // INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_VOLATILE_HPP_
A type trait to check if a type is volatile. The class is derived from true_type if Type is volatile,...
Definition is_volatile.hpp:37
constexpr bool is_volatile_v
A type trait to check if a type is volatile. The value is true if Type is volatile,...
constexpr bool is_volatile_v< Type volatile >
A type trait to check if a type is volatile. The value is true if Type is volatile,...
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