Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
iota.hpp
Go to the documentation of this file.
1// Copyright 2026, 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_IOTA_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IOTA_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 <numeric>
12// IWYU pragma: friend "stdlib_detail/.*"
13//
14#include "arene/base/algorithm/detail/traits.hpp"
15#include "arene/base/algorithm/iota.hpp"
16#include "arene/base/constraints.hpp"
17#include "arene/base/type_traits/is_invocable.hpp"
18#include "arene/base/type_traits/iterator_category_traits.hpp"
19#include "stdlib/include/stdlib_detail/declval.hpp"
20#include "stdlib/include/stdlib_detail/enable_if.hpp"
21#include "stdlib/include/stdlib_detail/is_convertible.hpp"
22
23namespace std {
24
25// parasoft-begin-suppress AUTOSAR-M3_3_2-a "False positive: inline function used in multiple translation units"
26/// @brief fills a range with successive increments of the starting value
27/// @tparam ForwardIt the type of the ForwardIt
28/// @tparam Value the type of the value
29/// @param first ForwardIt to the beginning of the range
30/// @param last ForwardIt to one past the end of the range
31/// @param value initial value to fill with
32///
33/// Fills the range <c> [first, last) </c> with sequentially increasing
34/// values, starting with @c value and repetitively evaluating
35/// <c> ++value </c>.
36///
37/// @pre @c ForwardIt must satisfy the forward iterator requirements
38/// @pre @c T is convertible to the value type of @c ForwardIt
39/// @pre the expression <c> ++value </c> is well-formed
40///
41/// @note Complexity <br>
42/// Exactly <c> distance(first, last) </c> increments and assignments.
43///
44template <
45 class ForwardIt,
46 class Value,
50 decltype(++declval<Value&>())
51 > = nullptr>
57// parasoft-end-suppress AUTOSAR-M3_3_2-a
58
59} // namespace std
60
61#endif // INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IOTA_HPP_
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