YSTest: any_iterator.hpp 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

any_iterator.hpp
浏览该文件的文档.
1 /*
2 © 2012-2016, 2018-2019 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #ifndef YB_INC_ystdex_any_iterator_hpp_
29 #define YB_INC_ystdex_any_iterator_hpp_ 1
30
31 #include "any.h" // for "any.h", any_ops, cond_t, wrap_handler, _t, decay_t,
32 // ptrdiff_t, any, exclude_self_t, any_ops::with_handler_t, is_convertible,
33 // indirect_t, unwrap_ref_decay_t, remove_reference_t;
34 #include "iterator.hpp" // for is_undereferenceable, input_iteratable,
35 // std::unique_ptr, forward_iteratable, bidirectional_iteratable;
36
37 namespace ystdex
38 {
39
40 namespace any_ops
41 {
42
44
45 enum iterator_op : op_code
46 {
51 check_undereferenceable = end_base_op,
53 dereference,
55 increase,
56 end_iterator_op
57 };
58
59
60 enum input_iterator_op : op_code
61 {
63 equals = end_iterator_op,
64 end_input_iterator_op,
65 end_output_iterator_op = end_input_iterator_op,
66 end_forward_iterator_op = end_input_iterator_op
67 };
68
69
70 enum bidirectional_iteartor_op : op_code
71 {
73 decrease = end_forward_iterator_op,
74 end_bidirectional_iterator_op
75 };
76
77
78 enum random_access_iteartor_op : op_code
79 {
81 advance = end_forward_iterator_op,
82 distance,
83 less_compare,
84 end_random_access_iteartor_op
85 };
87
88
90
91 template<typename _type, typename _tReference>
93 class iterator_handler : public wrap_handler<_type>::type
94 {
95 public:
97
98 using base = _t<wrap_handler<_type>>;
99 using value_type = typename base::value_type;
100
101 using base::get_reference;
102
103 using base::init;
105
107 static void
108 manage(any_storage& d, any_storage& s, any_ops::op_code op)
109 {
110 switch(op)
111 {
112 case check_undereferenceable:
113 d.access<bool>() = is_undereferenceable(get_reference(s));
114 break;
115 case dereference:
116 {
117 // XXX: The type %_tReference can be cv-qualified.
118 using val_t = cond_t<is_reference<_tReference>,
119 lref<remove_reference_t<_tReference>>,
120 remove_cv_t<_tReference>>;
121 auto& p(d.access<any*>());
122
123 yassume(p);
124 // NOTE: This implies %val_t shall be a decayed type.
125 *p = any(any_ops::with_handler_t<_t<any_ops::wrap_handler<
126 val_t>>>(), val_t(*get_reference(s)));
127 }
128 break;
129 case increase:
130 ++get_reference(d);
131 break;
132 default:
133 base::manage(d, s, op);
134 }
135 }
136 };
137
138
139 template<typename _type, typename _tReference>
140 class input_iterator_handler : public iterator_handler<_type, _tReference>
141 {
142 public:
144
145 using base = iterator_handler<_type, _tReference>;
146 using value_type = typename base::value_type;
147
148 private:
149 using iteratore_value_type
150 = typename std::iterator_traits<value_type>::value_type;
151 // XXX: The requirement on %reference is relaxed intentionally. See also https://stackoverflow.com/questions/53800391/iso-c-input-iterator-with-an-abstract-class-as-the-value-type.
153 static_assert(or_<and_<is_reference<_tReference>, or_<is_convertible<
154 _tReference, iteratore_value_type&>, is_convertible<_tReference,
155 iteratore_value_type&&>>>, is_convertible<_tReference,
156 iteratore_value_type>>(), "Invalid reference type not meeting relaxed"
157 " InputIterator requirements found.");
158
159 public:
160 using base::get_reference;
161
162 using base::init;
164
166 static void
167 manage(any_storage& d, any_storage& s, any_ops::op_code op)
168 {
169 switch(op)
170 {
171 case equals:
172 if(get_reference(*d.access<any_storage*>()) != get_reference(s))
173 d = static_cast< any_storage*>(nullptr);
174 break;
175 default:
176 base::manage(d, s, op);
177 }
178 }
179 };
180
181
182 template<typename _type, typename _tReference>
183 class forward_iterator_handler
184 : public input_iterator_handler<_type, _tReference>
185 {
186 public:
188
189 using base = input_iterator_handler<_type, _tReference>;
190 using value_type = typename base::value_type;
191
192 using base::get_reference;
193
194 using base::init;
195
196 using base::manage;
198 };
199
200
201 template<typename _type, typename _tReference>
202 class bidirectional_iterator_handler
203 : public forward_iterator_handler<_type, _tReference>
204 {
205 public:
207
208 using base = forward_iterator_handler<_type, _tReference>;
209 using value_type = typename base::value_type;
210
211 using base::get_reference;
212
213 using base::init;
215
217 static void
218 manage(any_storage& d, any_storage& s, any_ops::op_code op)
219 {
220 switch(op)
221 {
222 case decrease:
223 --get_reference(d);
224 break;
225 default:
226 base::manage(d, s, op);
227 }
228 }
229 };
231
232 } // namespace any_ops;
233
234
236
237
242 template<typename _type, typename _tDifference = ptrdiff_t,
243 typename _tPointer = _type*, typename _tReference = _type&>
244 class any_input_iterator : protected any,
245 public input_iteratable<any_input_iterator<_type, _tDifference, _tPointer,
246 _tReference>, _tReference>
247 {
248 protected:
250 using base = any;
251
252 public:
254
255 using iterator_category = std::input_iterator_tag;
256 using value_type = _type;
257 using difference_type = _tDifference;
259 using pointer = _tPointer;
260 using reference = _tReference;
261
263 any_input_iterator() = default;
268 template<typename _tIter,
269 yimpl(typename = exclude_self_t<any_input_iterator, _tIter>)>
270 any_input_iterator(_tIter&& i)
271 : any_input_iterator(any_ops::with_handler_t<
272 any_ops::input_iterator_handler<decay_t<_tIter>, reference>>(),
273 yforward(i))
274 {}
275
276 protected:
278 template<typename _tIter, typename _tHandler>
279 any_input_iterator(any_ops::with_handler_t<_tHandler> t, _tIter&& i)
280 : base(t, yforward(i))
281 {
282 static_assert(is_convertible<indirect_t<unwrap_ref_decay_t<_tIter>>,
283 reference>(), "Wrong target iterator type found.");
284 }
285
286 public:
288 any_input_iterator(const any_input_iterator&) = default;
290 any_input_iterator(any_input_iterator&&) = default;
291
293
294 any_input_iterator&
295 operator=(const any_input_iterator&) = default;
296 any_input_iterator&
297 operator=(any_input_iterator&&) = default;
299
300 reference
301 operator*() const
302 {
303 // TODO: More graceful implementation for unused value?
304 any res;
305 any_ops::any_storage t;
306 const auto gd(t.pun<any*>(&res));
307
308 call(t, any_ops::dereference);
309 return reference(
310 *ystdex::unchecked_any_cast<remove_reference_t<reference>>(&res));
311 }
312
313 pointer
314 operator->() const
315 {
316 return &**this;
317 }
318
319 any_input_iterator&
320 operator++()
321 {
322 call(get_storage(), any_ops::increase);
323 return *this;
324 }
325
327 friend bool
328 operator==(const any_input_iterator& x, const any_input_iterator& y)
329 {
330 if(x.has_value() || y.has_value())
331 {
332 yconstraint(x.type() == y.type());
333 return y.template unchecked_access<any_ops::any_storage*>(
334 any_ops::equals, &x.get_storage());
335 }
336 return true;
337 }
338
340
341 any&
342 get() ynothrow
343 {
344 return *this;
345 }
346 const any&
347 get() const ynothrow
348 {
349 return *this;
350 }
352
354 using any::get_object_ptr;
355
360 friend bool
361 is_undereferenceable(const any_input_iterator& i)
362 {
363 return i.has_value() ? i.template unchecked_access<bool>(
364 any_ops::check_undereferenceable) : true;
365 }
366
368 using any::try_get_object_ptr;
369
371 using any::type;
372 };
373
374
375 using input_monomorphic_iterator
376 = any_input_iterator<void_ref, ptrdiff_t, void*, void_ref_any>;
378
379
384 template<typename _type, typename _tDifference = ptrdiff_t,
385 typename _tPointer = _type*, typename _tReference = _type&>
386 class any_forward_iterator : public any_input_iterator<_type, _tDifference,
387 _tPointer, _tReference>, public forward_iteratable<any_forward_iterator<
388 _type, _tDifference, _tPointer, _tReference>, _tReference>
389 {
390 protected:
392 using base
393 = any_input_iterator<_type, _tDifference, _tPointer, _tReference>;
394
395 public:
396 using iterator_category = std::forward_iterator_tag;
397 using pointer = _tPointer;
398 using reference = _tReference;
399
400 any_forward_iterator() = default;
405 template<typename _tIter,
406 yimpl(typename = exclude_self_t<any_forward_iterator, _tIter>)>
407 any_forward_iterator(_tIter&& i)
408 : any_forward_iterator(any_ops::with_handler_t<
409 any_ops::forward_iterator_handler<decay_t<_tIter>, reference>>(),
410 yforward(i))
411 {
412 static_assert(is_convertible<indirect_t<unwrap_ref_decay_t<_tIter>>,
413 reference>(), "Wrong target iterator type found.");
414 }
415
416 protected:
418 template<typename _tIter, typename _tHandler>
419 any_forward_iterator(any_ops::with_handler_t<_tHandler> t, _tIter&& i)
420 : base(t, yforward(i))
421 {}
422
423 public:
424 any_forward_iterator(const any_forward_iterator&) = default;
425 any_forward_iterator(any_forward_iterator&&) = default;
426
428
429 any_forward_iterator&
430 operator=(const any_forward_iterator&) = default;
431 any_forward_iterator&
432 operator=(any_forward_iterator&&) = default;
434
435 any_forward_iterator&
436 operator++()
437 {
438 base::operator++();
439 return *this;
440 }
441
443 friend bool
444 operator==(const any_forward_iterator& x, const any_forward_iterator& y)
445 {
446 return static_cast<const base&>(x) == static_cast<const base&>(y);
447 }
448 };
449
450
451 using forward_monomorphic_iterator
452 = any_forward_iterator<void_ref, ptrdiff_t, void*, void_ref>;
453
454
459 template<typename _type, typename _tDifference = ptrdiff_t,
460 typename _tPointer = _type*, typename _tReference = _type&>
461 class any_bidirectional_iterator : public any_forward_iterator<_type,
462 _tDifference, _tPointer, _tReference>, public bidirectional_iteratable<
463 any_bidirectional_iterator<_type, _tDifference, _tPointer, _tReference>,
464 _tReference>
465 {
466 protected:
468 using base
469 = any_forward_iterator<_type, _tDifference, _tPointer, _tReference>;
470
471 public:
472 using iterator_category = std::bidirectional_iterator_tag;
473 using pointer = _tPointer;
474 using reference = _tReference;
475
476 any_bidirectional_iterator() = default;
481 template<typename _tIter,
482 yimpl(typename = exclude_self_t<any_bidirectional_iterator, _tIter>)>
483 any_bidirectional_iterator(_tIter&& i)
484 : any_forward_iterator<_type, _tPointer, _tReference>(yforward(i))
485 {}
486
487 protected:
489 template<typename _tIter, typename _tHandler>
490 any_bidirectional_iterator(any_ops::with_handler_t<_tHandler> t, _tIter&& i)
491 : base(t, yforward(i))
492 {}
493
494 public:
495 any_bidirectional_iterator(const any_bidirectional_iterator&) = default;
496 any_bidirectional_iterator(any_bidirectional_iterator&&) = default;
497
499
500 any_bidirectional_iterator&
501 operator=(const any_bidirectional_iterator&) = default;
502 any_bidirectional_iterator&
503 operator=(any_bidirectional_iterator&&) = default;
505
506 any_bidirectional_iterator&
507 operator++()
508 {
509 base::operator++();
510 return *this;
511 }
512
513 any_bidirectional_iterator&
514 operator--()
515 {
516 this->call(this->get_storage(), any_ops::decrease);
517 return *this;
518 }
519
521 friend bool
522 operator==(const any_bidirectional_iterator& x,
523 const any_bidirectional_iterator& y)
524 {
525 return static_cast<const base&>(x) == static_cast<const base&>(y);
526 }
527 };
528
529
530 using bidirectional_monomorphic_iterator
531 = any_bidirectional_iterator<void_ref, ptrdiff_t, void*, void_ref>;
533
534 } // namespace ystdex;
535
536 #endif
537
ystdex::any_ops::forward_iterator_handler
Definition: any_iterator.hpp:185
ystdex::any_input_iterator::get
any & get()
Definition: any_iterator.hpp:342
x
const EncapsulationBase & x
Definition: NPLA1Forms.cpp:1536
ystdex::lref
左值引用包装。
Definition: ref.hpp:61
ystdex::any_ops::input_iterator_op
input_iterator_op
Definition: any_iterator.hpp:61
ystdex::any_ops::op_code
std::uint32_t op_code
操作码。
Definition: any.h:237
ystdex::any::get_object_ptr
_type * get_object_ptr()
取目标指针。
Definition: any.h:2065
ystdex::any_input_iterator< _type, ptrdiff_t, _type *, _type & >::value_type
_type value_type
Definition: any_iterator.hpp:256
ystdex::any_forward_iterator::operator==
friend bool operator==(const any_forward_iterator &x, const any_forward_iterator &y)
Definition: any_iterator.hpp:444
ystdex::any_input_iterator::operator->
pointer operator->() const
Definition: any_iterator.hpp:314
ystdex::any_ops::bidirectional_iterator_handler::manage
static void manage(any_storage &d, any_storage &s, any_ops::op_code op)
Definition: any_iterator.hpp:218
ystdex::any_input_iterator< _type, ptrdiff_t, _type *, _type & >::difference_type
ptrdiff_t difference_type
Definition: any_iterator.hpp:257
ystdex::details::any_base::call
any_ops::any_storage & call(any_ops::any_storage &t, any_ops::op_code op) const
Definition: any.h:1233
ystdex::any_ops::iterator_op
iterator_op
Definition: any_iterator.hpp:46
ystdex::any::try_get_object_ptr
_type * try_get_object_ptr()
尝试取目标指针：存储目标类型和模板参数相同且不存在持有者抛出的异常。
Definition: any.h:2135
ystdex::any_bidirectional_iterator::operator--
any_bidirectional_iterator & operator--()
Definition: any_iterator.hpp:514
ystdex::any_ops::advance
@ advance
Definition: any_iterator.hpp:81
ystdex::unchecked_any_cast
_type * unchecked_any_cast(any *p)
未检查的动态泛型转换。
Definition: any.h:2324
ystdex::any_input_iterator< _type, ptrdiff_t, _type *, _type & >::pointer
_type * pointer
Definition: any_iterator.hpp:259
ystdex::any_ops::end_random_access_iteartor_op
@ end_random_access_iteartor_op
Definition: any_iterator.hpp:84
ystdex::any_forward_iterator::operator++
any_forward_iterator & operator++()
Definition: any_iterator.hpp:436
ystdex::any_input_iterator::operator=
any_input_iterator & operator=(const any_input_iterator &)=default
ystdex::any_forward_iterator::any_forward_iterator
any_forward_iterator(any_ops::with_handler_t< _tHandler > t, _tIter &&i)
Definition: any_iterator.hpp:419
ystdex::any_forward_iterator::any_forward_iterator
any_forward_iterator(any_forward_iterator &&)=default
CHRLib::d
_tDst * d
Definition: CharacterProcessing.h:142
ystdex::any_input_iterator
动态泛型输入迭代器。
Definition: any_iterator.hpp:247
ystdex::any_forward_iterator::any_forward_iterator
any_forward_iterator()=default
ystdex::any_input_iterator::is_undereferenceable
friend bool is_undereferenceable(const any_input_iterator &i)
Definition: any_iterator.hpp:361
ystdex::any_input_iterator::any_input_iterator
any_input_iterator(_tIter &&i)
构造：使用现有迭代器。
Definition: any_iterator.hpp:270
ystdex::any_ops::distance
@ distance
Definition: any_iterator.hpp:82
ystdex::any_ops::iterator_handler::manage
static void manage(any_storage &d, any_storage &s, any_ops::op_code op)
Definition: any_iterator.hpp:108
ystdex::any_ops
Definition: any.h:68
ystdex::any_input_iterator::any_input_iterator
any_input_iterator(any_input_iterator &&)=default
ystdex::any_input_iterator::any_input_iterator
any_input_iterator()=default
ystdex::any_ops::with_handler_t
Definition: any.h:73
ystdex::any_bidirectional_iterator::operator=
any_bidirectional_iterator & operator=(any_bidirectional_iterator &&)=default
ystdex::any_bidirectional_iterator::reference
_tReference reference
Definition: any_iterator.hpp:474
ystdex::indirect_t
decltype(*std::declval< _type >()) indirect_t
Definition: type_traits.hpp:69
ystdex::any_input_iterator::operator*
reference operator*() const
Definition: any_iterator.hpp:301
ystdex::any_ops::increase
@ increase
Definition: any_iterator.hpp:55
yassume
#define yassume(_expr)
假定：环境语义。
Definition: cassert.h:96
ystdex::standard_layout_storage< aligned_storage_t< sizeof(any_local_data), std::alignment_of< any_local_data >::value > >
ystdex::cpp2014::decay_t
typename decay< _type >::type decay_t
Definition: meta.hpp:196
any.h
动态泛型类型。
ystdex::any_ops::input_iterator_handler
Definition: any_iterator.hpp:141
ystdex::any_bidirectional_iterator
动态泛型双向迭代器。
Definition: any_iterator.hpp:465
ystdex::any_input_iterator< _type, ptrdiff_t, _type *, _type & >::reference
_type & reference
Definition: any_iterator.hpp:260
ystdex::any_bidirectional_iterator::operator=
any_bidirectional_iterator & operator=(const any_bidirectional_iterator &)=default
ystdex::details::ebases
Definition: operators.hpp:108
ystdex::any_ops::input_iterator_handler::manage
static void manage(any_storage &d, any_storage &s, any_ops::op_code op)
Definition: any_iterator.hpp:167
ystdex::or_
逻辑或。
Definition: integral_constant.hpp:172
yforward
#define yforward(_expr)
根据参数类型使用 std::forward 转发对应参数。
Definition: ydef.h:1508
ystdex::any_ops::end_output_iterator_op
@ end_output_iterator_op
Definition: any_iterator.hpp:65
iterator.hpp
通用迭代器。
ystdex::any_bidirectional_iterator::iterator_category
std::bidirectional_iterator_tag iterator_category
Definition: any_iterator.hpp:472
ystdex::any_ops::forward_iterator_handler::value_type
typename base::value_type value_type
Definition: any_iterator.hpp:190
ystdex::any_ops::end_input_iterator_op
@ end_input_iterator_op
Definition: any_iterator.hpp:64
YSLib::i
return i
Definition: YCoreUtilities.h:177
ystdex::any::any
any()=default
ystdex::any_forward_iterator::any_forward_iterator
any_forward_iterator(_tIter &&i)
构造：使用现有迭代器。
Definition: any_iterator.hpp:407
ystdex::cpp2014::remove_cv_t
typename remove_cv< _type >::type remove_cv_t
Definition: meta.hpp:142
ystdex::any_ops::end_iterator_op
@ end_iterator_op
Definition: any_iterator.hpp:56
ystdex::any_bidirectional_iterator::any_bidirectional_iterator
any_bidirectional_iterator(_tIter &&i)
构造：使用现有迭代器。
Definition: any_iterator.hpp:483
ystdex::any_input_iterator::get
const any & get() const
Definition: any_iterator.hpp:347
yconstraint
#define yconstraint(_expr)
约束：接口语义。
Definition: cassert.h:125
YSLib::UI::y
SPos SPos y
Definition: YWidget.cpp:44
ystdex::any_forward_iterator::operator=
any_forward_iterator & operator=(any_forward_iterator &&)=default
ystdex::any_ops::iterator_handler::value_type
typename base::value_type value_type
Definition: any_iterator.hpp:99
ystdex::any_bidirectional_iterator::any_bidirectional_iterator
any_bidirectional_iterator()=default
ystdex::any_bidirectional_iterator::pointer
_tPointer pointer
Definition: any_iterator.hpp:473
CHRLib::s
_tDst const _tSrc * s
Definition: CharacterProcessing.h:143
ystdex::cond_t
_t< cond< _tCond, _tThen, _tElse > > cond_t
Definition: meta.hpp:794
ystdex::exclude_self_t
enable_if_t<!is_same_param< _tSelected, _tParam >::value, _type > exclude_self_t
排除选择类型的特定参数的重载。
Definition: meta.hpp:865
ystdex::is_undereferenceable
bool is_undereferenceable(const _tIter &)
Definition: deref_op.hpp:46
ystdex::any_input_iterator< _type, ptrdiff_t, _type *, _type & >::iterator_category
std::input_iterator_tag iterator_category
Definition: any_iterator.hpp:255
ystdex::any_ops::check_undereferenceable
@ check_undereferenceable
Definition: any_iterator.hpp:51
ystdex::any_ops::input_iterator_handler::iteratore_value_type
typename std::iterator_traits< value_type >::value_type iteratore_value_type
Definition: any_iterator.hpp:150
ystdex
<memory> 特性测试宏。
Definition: ydef.h:1262
ystdex::any_input_iterator::operator==
friend bool operator==(const any_input_iterator &x, const any_input_iterator &y)
Definition: any_iterator.hpp:328
ystdex::any_forward_iterator::operator=
any_forward_iterator & operator=(const any_forward_iterator &)=default
ystdex::any_bidirectional_iterator::operator==
friend bool operator==(const any_bidirectional_iterator &x, const any_bidirectional_iterator &y)
Definition: any_iterator.hpp:522
ystdex::any_bidirectional_iterator::any_bidirectional_iterator
any_bidirectional_iterator(any_ops::with_handler_t< _tHandler > t, _tIter &&i)
Definition: any_iterator.hpp:490
ystdex::unwrap_ref_decay_t
_t< unwrap_ref_decay< _type > > unwrap_ref_decay_t
Definition: ref.hpp:203
ystdex::any::type
const type_info & type() const
Definition: any.h:2151
ystdex::any_ops::bidirectional_iteartor_op
bidirectional_iteartor_op
Definition: any_iterator.hpp:71
ystdex::any_ops::random_access_iteartor_op
random_access_iteartor_op
Definition: any_iterator.hpp:79
ystdex::any_ops::wrap_handler
根据类型选择引用或值处理器。
Definition: any.h:1067
ystdex::any
基于类型擦除的动态泛型对象。
Definition: any.h:1634
ystdex::any_ops::decrease
@ decrease
Definition: any_iterator.hpp:73
ystdex::_t
typename _type::type _t
嵌套类型别名。
Definition: meta.hpp:45
ystdex::any_ops::bidirectional_iterator_handler
Definition: any_iterator.hpp:204
ystdex::any_ops::iterator_handler::base
_t< wrap_handler< _type > > base
Definition: any_iterator.hpp:98
ystdex::any_ops::end_base_op
@ end_base_op
结束操作标记。
Definition: any.h:366
ystdex::any_bidirectional_iterator::any_bidirectional_iterator
any_bidirectional_iterator(any_bidirectional_iterator &&)=default
ystdex::cpp2014::remove_reference_t
typename remove_reference< _type >::type remove_reference_t
Definition: meta.hpp:155
ystdex::any_ops::dereference
@ dereference
Definition: any_iterator.hpp:53
platform::p
return p p
Definition: YCLib/FileSystem.h:209
ystdex::any_ops::end_forward_iterator_op
@ end_forward_iterator_op
Definition: any_iterator.hpp:66
const
const Decapsulate const Decapsulate &y ynothrow ContextNode &ctx const
Definition: NPLA1Forms.cpp:1629
yimpl
#define yimpl(...)
实现标签。
Definition: ydef.h:413
ystdex::any_input_iterator::any_input_iterator
any_input_iterator(any_ops::with_handler_t< _tHandler > t, _tIter &&i)
Definition: any_iterator.hpp:279
ystdex::any_ops::iterator_handler
Definition: any_iterator.hpp:94
ystdex::any_input_iterator::operator++
any_input_iterator & operator++()
Definition: any_iterator.hpp:320
ynothrow
#define ynothrow
YSLib 无异常抛出保证：若支持 noexcept 关键字， 指定特定的 noexcept 异常规范。
Definition: ydef.h:1199
ystdex::any_input_iterator::any_input_iterator
any_input_iterator(const any_input_iterator &)=default
ystdex::any_forward_iterator
动态泛型前向迭代器。
Definition: any_iterator.hpp:389
ystdex::any_forward_iterator::any_forward_iterator
any_forward_iterator(const any_forward_iterator &)=default
ystdex::any_bidirectional_iterator::any_bidirectional_iterator
any_bidirectional_iterator(const any_bidirectional_iterator &)=default
ystdex::any_ops::less_compare
@ less_compare
Definition: any_iterator.hpp:83
ystdex::any_ops::end_bidirectional_iterator_op
@ end_bidirectional_iterator_op
Definition: any_iterator.hpp:74
ystdex::any_input_iterator::operator=
any_input_iterator & operator=(any_input_iterator &&)=default
ystdex::any_bidirectional_iterator::operator++
any_bidirectional_iterator & operator++()
Definition: any_iterator.hpp:507
ystdex::details::any_base::get_storage
any_ops::any_storage & get_storage() const
Definition: any.h:1299
ystdex::any_ops::input_iterator_handler::value_type
typename base::value_type value_type
Definition: any_iterator.hpp:146
ystdex::any_ops::equals
@ equals
Definition: any_iterator.hpp:63
ystdex::and_
逻辑操作元函数。
Definition: integral_constant.hpp:151
ystdex::standard_layout_storage::pun
pun_ptr< _type > pun(_tParams &&... args)
Definition: type_pun.hpp:389