Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
iter_value_t.hpp
Go to the documentation of this file.
1
// parasoft-begin-suppress AUTOSAR-A2_8_1-a-2 "False positive: also defines arene::base::iter_value_t"
2
// Copyright 2026, Toyota Motor Corporation
3
//
4
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5
6
#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ITERATOR_ITER_VALUE_T_HPP_
7
#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ITERATOR_ITER_VALUE_T_HPP_
8
9
// IWYU pragma: private, include "arene/base/iterator.hpp"
10
// IWYU pragma: friend "(arene/base(?!/tests)|stdlib/include/stdlib_detail)/.*"
11
12
#include "
arene/base/iterator/indirectly_readable_traits.hpp
"
13
// IWYU pragma: no_include "arene/base/stdlib_choice/remove_cv.hpp"
14
// IWYU pragma: no_include "arene/base/stdlib_choice/remove_reference.hpp"
15
#include "
arene/base/type_traits/remove_cvref.hpp
"
16
17
namespace
arene
{
18
namespace
base
{
19
20
/// @brief Determins the value type of the given iterator.
21
/// @tparam Itr The iterator type.
22
/// The result type will be equivalent to @c indirectly_readable_traits<remove_cvref_t<Itr>>::value_type if it is
23
/// defined. Otherwise @c iter_value_t<Itr> will be ill-formed.
24
///
25
/// @note unlike @c std::iter_value_t<Itr> , this does not have the fallback to explicit user specializations of
26
/// @c std::iterator_traits<Itr>::value_type . Users should specialize @c indirectly_readable_traits for their custom
27
/// iterators if the default behavior is not suitable.
28
template
<
typename
Itr>
29
using
iter_value_t
=
typename
indirectly_readable_traits<remove_cvref_t<Itr>
>::value_type;
30
31
}
// namespace base
32
}
// namespace arene
33
34
#endif
// INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ITERATOR_ITER_VALUE_T_HPP_
arene::base::indirectly_readable_traits
Determines the value_type of an input indirectly readable type, which is a type whose value is "reada...
Definition
indirectly_readable_traits.hpp:117
indirectly_readable_traits.hpp
arene::base
Definition
accumulate.hpp:37
arene::base::iter_value_t
typename indirectly_readable_traits< remove_cvref_t< Itr > >::value_type iter_value_t
Determins the value type of the given iterator.
Definition
iter_value_t.hpp:29
arene
Definition
accumulate.hpp:36
remove_cvref.hpp
arene
base
iterator
iter_value_t.hpp
Generated by
1.13.2