Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
declval.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_DECLVAL_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_DECLVAL_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 <utility>
12// IWYU pragma: friend "stdlib_detail/.*"
13
14namespace std {
15
16// parasoft-begin-suppress AUTOSAR-A2_7_3-a "False positive: there is a comment with @brief"
17// parasoft-begin-suppress AUTOSAR-A2_7_3-b "False positive: there is a comment with @return"
18// parasoft-begin-suppress AUTOSAR-M3_3_2-a-2 "False positive: inline function used in multiple translation units"
19/// @brief A dummy function that is declared but not defined, with a user-specified return type, for use in unevaluated
20/// expressions.
21/// @tparam T The return type
22/// @return An imaginary instance of the specified type if the type is a reference type, or as an rvalue of the
23/// specified type otherwise.
24template <typename T>
25auto declval() noexcept -> T&&;
26// parasoft-end-suppress AUTOSAR-A2_7_3-a
27// parasoft-end-suppress AUTOSAR-A2_7_3-b
28// parasoft-end-suppress AUTOSAR-M3_3_2-a-2
29
30} // namespace std
31
32#endif // INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_DECLVAL_HPP_
auto declval() noexcept -> T &&
A dummy function that is declared but not defined, with a user-specified return type,...
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