cpp-msgpack-light 0.3.0
A light library to serialize MessagePack.
Loading...
Searching...
No Matches
array_iterator_impl.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 MusicScience37 (Kenta Kabashima)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
20#pragma once
21
23#include "msgpack_light/details/object_ref.h" // IWYU pragma: keep
24
25namespace msgpack_light {
26
27/*
28 * Definition of some members of mutable_array_iterator.
29 */
30
31template <typename Allocator>
36
46template <typename Allocator>
47[[nodiscard]] inline bool operator==(mutable_array_iterator<Allocator> lhs,
49 return &(*lhs).data() == &(*rhs).data();
50}
51
61template <typename Allocator>
62[[nodiscard]] inline bool operator!=(mutable_array_iterator<Allocator> lhs,
64 return !(lhs == rhs);
65}
66
67/*
68 * Definition of some members of const_array_iterator.
69 */
70
74
83[[nodiscard]] inline bool operator==(
85 return &(*lhs).data() == &(*rhs).data();
86}
87
96[[nodiscard]] inline bool operator!=(
98 return !(lhs == rhs);
99}
100
101} // namespace msgpack_light
Definition of classes of iterators of arrays.
Class of iterators of arrays to access constant objects.
const details::object_data * pointer_
Pointer to the current data.
const_object_ref operator*() const noexcept
Dereference this iterator.
Class to access constant objects.
Definition object_ref.h:129
Class of iterators of arrays to access non-constant objects.
mutable_object_ref< Allocator > operator*() const noexcept
Dereference this iterator.
details::allocator_wrapper< Allocator > * allocator_
Allocator.
details::object_data * pointer_
Pointer to the current data.
Class to access non-constant objects.
Definition object_ref.h:48
Namespace of this project.
Definition binary.h:33
bool operator==(binary_view lhs, binary_view rhs)
Compare two binary data.
Definition binary.h:384
bool operator!=(binary_view lhs, binary_view rhs)
Compare two binary data.
Definition binary.h:397
Definition of classes of references to objects.