Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
basic_iterator.hpp
Go to the documentation of this file.
1
// parasoft-begin-suppress AUTOSAR-A2_8_1-a-2 "basic_iterator.hpp matches the section name in the standard"
2
3
// Copyright 2026, Toyota Motor Corporation
4
//
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
7
#
ifndef
INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_BASIC_ITERATOR_HPP_
8
#
define
INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_BASIC_ITERATOR_HPP_
9
10
// parasoft-begin-suppress CERT_CPP-DCL58-a-2 "Part of a standard library implementation"
11
// parasoft-begin-suppress AUTOSAR-A17_6_1-a-2 "Part of a standard library implementation"
12
13
// IWYU pragma: private, include <iterator>
14
#
include
"stdlib/include/stdlib_detail/cstddef.hpp"
15
16
namespace
std
{
17
18
/// @brief base class to ease the definition of required types for simple
19
/// iterators
20
/// @tparam Category iterator category tag type
21
/// @tparam T iterator value type
22
/// @tparam Distance iterator difference type
23
/// @tparam Pointer iterator pointer type
24
/// @tparam Reference iterator reference type
25
///
26
/// The @c std::iterator template may be used as a base class to ease the definition
27
/// of required types for new iterators.
28
///
29
template
<
class
Category,
class
T,
class
Distance =
ptrdiff_t
,
class
Pointer = T*,
class
Reference = T&>
30
class
iterator
{
31
public
:
32
// parasoft-begin-suppress AUTOSAR-A2_10_1-d "False positive: No identifiers are being hidden"
33
34
/// @brief iterator value type
35
using
value_type = T;
36
/// @brief iterator difference type
37
using
difference_type = Distance;
38
/// @brief iterator pointer type
39
using
pointer = Pointer;
40
/// @brief iterator reference type
41
using
reference = Reference;
42
/// @brief iterator category tag type
43
using
iterator_category = Category;
44
45
// parasoft-end-suppress AUTOSAR-A2_10_1-d
46
};
47
48
}
// namespace std
49
50
#
endif
// INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_BASIC_ITERATOR_HPP_
std::iterator
base class to ease the definition of required types for simple iterators
Definition
basic_iterator.hpp:30
std::hash<::arene::base::result< void, E > >::operator()
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
stdlib
include
stdlib_detail
basic_iterator.hpp
Generated by
1.13.2