BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslstl_randomaccessiterator.h
Go to the documentation of this file.
1/// @file bslstl_randomaccessiterator.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslstl_randomaccessiterator.h -*-C++-*-
8#ifndef INCLUDED_BSLSTL_RANDOMACCESSITERATOR
9#define INCLUDED_BSLSTL_RANDOMACCESSITERATOR
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup bslstl_randomaccessiterator bslstl_randomaccessiterator
15/// @brief Provide a template to create STL-compliant random access iterators.
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslstl
19/// @{
20/// @addtogroup bslstl_randomaccessiterator
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslstl_randomaccessiterator-purpose"> Purpose</a>
25/// * <a href="#bslstl_randomaccessiterator-classes"> Classes </a>
26/// * <a href="#bslstl_randomaccessiterator-canonical-header"> Canonical Header </a>
27/// * <a href="#bslstl_randomaccessiterator-description"> Description </a>
28/// * <a href="#bslstl_randomaccessiterator-usage"> Usage </a>
29/// * <a href="#bslstl_randomaccessiterator-example-1-defining-a-standard-compliant-random-access-iterator"> Example 1: Defining a Standard Compliant Random Access Iterator </a>
30///
31/// # Purpose {#bslstl_randomaccessiterator-purpose}
32/// Provide a template to create STL-compliant random access iterators.
33///
34/// # Classes {#bslstl_randomaccessiterator-classes}
35///
36/// - bslstl::RandomAccessIterator: random-access iterator template
37///
38/// # Canonical Header {#bslstl_randomaccessiterator-canonical-header}
39/// bsl_iterator.h
40///
41/// @see bslstl_iterator, bslstl_forwarditerator,
42/// bslstl_bidirectionaliterator
43///
44/// # Description {#bslstl_randomaccessiterator-description}
45/// This component provides an iterator adaptor that, given an
46/// implementation class defining a core set of iterator functionality specified
47/// in the class level documentation, adapts it to provide an STL-compliant
48/// random access iterator interface. `bslstl::RandomAccessIterator` meets the
49/// requirements of a random access iterator described in the C++11 standard
50/// [24.2.7] under the tag "[random.access.iterators]". Include bsl_iterator.h
51/// to use this component.
52///
53/// ## Usage {#bslstl_randomaccessiterator-usage}
54///
55///
56/// In this section we show intended use of this component.
57///
58/// ### Example 1: Defining a Standard Compliant Random Access Iterator {#bslstl_randomaccessiterator-example-1-defining-a-standard-compliant-random-access-iterator}
59///
60///
61/// Suppose we want to create a standard compliant random access iterator for a
62/// container.
63///
64/// First, we define an iterator, `MyArrayIterator`, that meets the requirements
65/// of the `IMP_ITER` template parameter of `RandomAccessIterator` class (see
66/// class level documentation), but does not meet the full set of requirements
67/// for a random access iterator as defined by the C++ standard. Note that the
68/// following shows only the public interface required. Private members and
69/// additional methods that may be needed to implement this class are elided in
70/// this example:
71/// @code
72/// template <class VALUE>
73/// class MyArrayIterator {
74/// // This class implements the minimal requirements to implement a random
75/// // access iterator using 'bslstl::RandomAccessIterator'.
76///
77/// public:
78/// // CREATORS
79/// MyArrayIterator();
80/// // Create a 'MyArrayIterator' object that does not refer to any
81/// // value.
82///
83/// MyArrayIterator(const MyArrayIterator& original);
84/// // Create a 'MyArrayIterator' object having the same value
85/// // as the specified 'original' object.
86///
87/// ~MyArrayIterator();
88/// // Destroy this object;
89///
90/// // MANIPULATORS
91/// MyArrayIterator& operator=(const MyArrayIterator& rhs);
92/// // Assign to this object the value of the specified 'rhs' object,
93/// // and return a reference providing modifiable access to this
94/// // object.
95///
96/// void operator++();
97/// // Increment this object to refer to the next element in an array.
98///
99/// void operator--();
100/// // Decrement this object to refer to the previous element in an
101/// // array.
102///
103/// void operator+=(std::ptrdiff_t n);
104/// // Move this object forward by the specified 'n' elements in the
105/// // array.
106///
107/// void operator-=(std::ptrdiff_t n);
108/// // Move this object backward by the specified 'n' elements in the
109/// // array.
110///
111/// // ACCESSORS
112/// VALUE& operator*() const;
113/// // Return a reference providing modifiable access to the value (of
114/// // the parameterized 'VALUE' type) of the element referred to by
115/// // this object.
116/// };
117///
118/// template <class VALUE>
119/// bool operator==(const MyArrayIterator<VALUE>&,
120/// const MyArrayIterator<VALUE>&);
121/// template <class VALUE>
122/// bool operator<(const MyArrayIterator<VALUE>&,
123/// const MyArrayIterator<VALUE>&);
124/// template <class VALUE>
125/// std::ptrdiff_t operator-(const MyArrayIterator<VALUE>&,
126/// const MyArrayIterator<VALUE>&);
127/// @endcode
128/// Notice that `MyArrayIterator` does not implement a complete standard
129/// compliant random access iterator. It is missing methods such as `operator+`
130/// and `operator[]`.
131///
132/// Then, we define the interface for our container class template,
133/// `MyFixedSizeArray`. The implementation of the interface is elided for
134/// brevity:
135/// @code
136/// template <class VALUE, int SIZE>
137/// class MyFixedSizeArray {
138/// // This class implements a container that contains the parameterized
139/// // 'SIZE' number of elements of the parameterized 'VALUE' type.
140///
141/// // DATA
142/// VALUE d_array[SIZE]; // storage of the container
143///
144/// public:
145/// // PUBLIC TYPES
146/// typedef VALUE value_type;
147/// @endcode
148/// Now, we use `RandomAccessIterator` to create a standard compliant iterator
149/// for this container:
150/// @code
151/// typedef bslstl::RandomAccessIterator<VALUE,
152/// MyArrayIterator<VALUE> > iterator;
153/// typedef bslstl::RandomAccessIterator<const VALUE,
154/// MyArrayIterator<VALUE> >
155/// const_iterator;
156/// @endcode
157/// Notice that the implementation for `const_iterator` is
158/// `MyArrayIterator<VALUE>` and *not* `MyArrayIterator<const VALUE>`.
159///
160/// Next, we continue defining the rest of the class.
161/// @code
162/// // CREATORS
163/// //! MyFixedSizeArray() = default;
164/// // Create a 'MyFixedSizeArray' object having the parameterized
165/// // 'SIZE' number of elements of the parameterized type 'VALUE'.
166///
167/// //! MyFixedSizeArray(const MyFixedSizeArray& original) = default;
168/// // Create a 'MyFixedSizeArray' object having same number of
169/// // elements as that of the specified 'original', the same value of
170/// // each element as that of corresponding element in 'original'.
171///
172/// //! ~MyFixedSizeArray() = default;
173/// // Destroy this object.
174///
175/// // MANIPULATORS
176/// iterator begin();
177/// // Return a random access iterator providing modifiable access to
178/// // the first valid element of this object.
179///
180/// iterator end();
181/// // Return a random access iterator providing modifiable access to
182/// // the last valid element of this object.
183///
184/// VALUE& operator[](std::ptrdiff_t position);
185/// // Return a reference providing modifiable access to the element at
186/// // the specified 'position'.
187///
188/// // ACCESSORS
189/// const_iterator begin() const;
190/// // Return a random access iterator providing non-modifiable access
191/// // to the first valid element of this object.
192///
193/// const_iterator end() const;
194/// // Return a random access iterator providing non-modifiable access
195/// // to the last valid element of this object.
196///
197/// const VALUE& operator[](std::ptrdiff_t position) const;
198/// // Return a reference providing non-modifiable access to the
199/// // specified 'i'th element in this object.
200/// };
201/// @endcode
202/// Then, we create a `MyFixedSizeArray` and initialize its elements:
203/// @code
204/// MyFixedSizeArray<int, 5> fixedArray;
205/// fixedArray[0] = 3;
206/// fixedArray[1] = 2;
207/// fixedArray[2] = 5;
208/// fixedArray[3] = 4;
209/// fixedArray[4] = 1;
210/// @endcode
211/// Finally, to show that `MyFixedSizeArray::iterator` can be used as a random
212/// access iterator, we invoke a function that takes random iterators as
213/// parameters, such as `std::sort`, on the `begin` and `end` iterators
214/// and verify the results:
215/// @code
216/// std::sort(fixedArray.begin(), fixedArray.end());
217///
218/// assert(fixedArray[0] == 1);
219/// assert(fixedArray[1] == 2);
220/// assert(fixedArray[2] == 3);
221/// assert(fixedArray[3] == 4);
222/// assert(fixedArray[4] == 5);
223/// @endcode
224/// @}
225/** @} */
226/** @} */
227
228/** @addtogroup bsl
229 * @{
230 */
231/** @addtogroup bslstl
232 * @{
233 */
234/** @addtogroup bslstl_randomaccessiterator
235 * @{
236 */
237
238#include <bslscm_version.h>
239
241#include <bslstl_iterator.h>
242
243#include <bslmf_removecv.h>
245
246#include <iterator>
247
248#include <cstddef> // 'ptrdiff_t'
249
250
251
252namespace bslstl {
253
254 //===========================
255 // class RandomAccessIterator
256 //===========================
257
258/// Given an `ITER_IMP` type that implements a minimal subset of an iterator
259/// interface, this template generates a complete iterator that meets all of
260/// the requirements of a "random-access iterator" in the C++ standard. If
261/// `T` is const-qualified, then the resulting type is a const iterator.
262/// `T` shall not be a function, reference type or void. `ITER_IMP` must
263/// provide public operations so that, for objects `i` and `j` of type
264/// `ITER_IMP` and `n` of an integral type, the following operations are
265/// supported:
266/// @code
267/// ITER_IMP i; default construction
268/// ITER_IMP j(i); copy construction
269/// i = j assignment
270/// ++i increment to next element
271/// --i decrement to previous element
272/// i += n increment by n elements
273/// i -= n decrement by n elements
274/// j - i // convertible to ptrdiff_t distance from i to j
275/// i == j // convertible to bool equality comparison
276/// i < j // convertible to bool less-than comparison
277/// *i // reference convertible to T& element access (dereference)
278/// @endcode
279template <class T, class ITER_IMP, class TAG_TYPE =
280 std::random_access_iterator_tag>
282 : public BidirectionalIterator<T,ITER_IMP, TAG_TYPE> {
283
284 // PRIVATE TYPES
285 typedef typename bsl::remove_cv<T>::type UnCvqT; // value type without
286 // 'const' and
287 // 'volatile'
288 // qualifications
289 public:
290 // TYPES
291 typedef UnCvqT value_type;
292 typedef std::ptrdiff_t difference_type;
293 typedef T *pointer;
294 typedef T& reference;
295 typedef std::random_access_iterator_tag iterator_category;
296
297 // CREATORS
298
299 /// Construct the default value for this iterator type. All default-
300 /// constructed `RandomAccessIterator` objects represent
301 /// non-dereferenceable iterators into the same empty range. They do
302 /// not have a singular value unless an object of the type specified by
303 /// the template parameter `ITER_IMP` has a singular value after
304 /// value-initialization.
306
307 /// Construct a random access iterator having the specified
308 /// `implementation` of the parameterized `ITER_IMP` type.
309 RandomAccessIterator(const ITER_IMP& implementation); // IMPLICIT
310
311 /// Construct a random access iterator from another (compatible)
312 /// `RandomAccessIterator` type, e.g., a mutable iterator of the same type.
313 ///
314 /// \note Note that this constructor may be the copy constructor
315 /// (inhibiting the implicit declaration of a copy constructor above),
316 /// or may be an additional overload.
319
321 // Destroy this iterator. Note that this method's definition is
322 // compiler generated.
323
324 // MANIPULATORS
325
326 /// Copy the value of the specified `rhs` to this iterator. Return a
327 /// reference to this modifiable iterator.
330
331 /// Increment to the next element. Return a reference to this modifiable iterator.
332 ///
333 /// \pre The behavior is undefined if, on entry, this
334 /// iterator has the past-the-end value for an iterator over the
335 /// underlying sequence.
337
338 /// Decrement to the previous element. Return a reference to this modifiable iterator.
339 ///
340 /// \pre The behavior is undefined if, on entry, this
341 /// iterator has the same value as an iterator to the start of the
342 /// underlying sequence.
344
345 /// Increment by the specified `offset` number of elements. Return a
346 /// reference to this modifiable iterator.
347 ///
348 /// \pre The behavior is undefined unless the iterator, after incrementing by `offset`, is within the
349 /// bounds of the underlying sequence.
351
352 /// Decrement by the specified `offset` number of elements. Return a
353 /// reference to this modifiable iterator.
354 ///
355 /// \pre The behavior is undefined unless the iterator, after decrementing by `offset`, is within the
356 /// bounds of the underlying sequence.
358
359 // ACCESSORS
360
361 /// Return a reference to the element at the specified `index` positions past the current one.
362 ///
363 /// \pre The behavior is undefined unless the
364 /// referenced position lies within the underlying sequence.
365 ///
366 /// \note Note that `index` may be negative.
367 T& operator[](difference_type index) const;
368};
369
370// FREE OPERATORS
371
372/// Return `true` if the specified `lhs` iterator has the same value as the
373/// specified `rhs` iterator, and `false` otherwise. Two iterators have the
374/// same value if they refer to the same element, or both have the past-the- end value for the underlying sequence.
375///
376/// \pre The behavior is undefined unless
377/// both iterators refer to the same underlying sequence.
378template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
381
382/// Return `true` if the specified `lhs` iterator does not have the same
383/// value as the specified `rhs` iterator, and `false` otherwise. Two
384/// iterators do not have the same value if (1) they do not refer to the
385/// same element and (2) both do not have the past-the-end iterator value for the underlying sequence.
386///
387/// \pre The behavior is undefined unless both
388/// iterators refer to the same underlying sequence.
389template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
392
393/// Increment the specified `iter` to next element. Return the previous value of `iter`.
394///
395/// \pre The behavior is undefined if, on entry, `iter` has the
396/// past-the-end value for an iterator of the underlying sequence.
397template <class T, class ITER_IMP, class TAG_TYPE>
400
401/// Decrement the specified `iter` to previous element. Return the previous value of `iter`.
402///
403/// \pre The behavior is undefined if, on entry, `iter` has the
404/// same value as an iterator to the start of the underlying sequence.
405template <class T, class ITER_IMP, class TAG_TYPE>
408
409/// Return an iterator to the element at the specified `rhs` positions past the specified `lhs`.
410///
411/// \pre The behavior is undefined unless `lhs`, after
412/// incrementing by `rhs`, is within the bounds of the underlying sequence.
413template <class T, class ITER_IMP, class TAG_TYPE>
416 std::ptrdiff_t rhs);
417
418/// Return an iterator to the element at the specified `lhs` positions past the specified `rhs`.
419///
420/// \pre The behavior is undefined unless `rhs`, after
421/// incrementing by `lhs`, is within the bounds of the underlying sequence.
422template <class T, class ITER_IMP, class TAG_TYPE>
424operator+(std::ptrdiff_t lhs,
426
427/// Return an iterator to the element at the specified `rhs` positions before the specified `lhs`.
428///
429/// \pre The behavior is undefined unless `lhs`,
430/// after decrementing by `rhs`, is within the bounds of the underlying sequence.
431///
432/// \note Note that this function is logically equivalent to:
433/// @code
434/// iter + (-rhs)
435/// @endcode
436template <class T, class ITER_IMP, class TAG_TYPE>
439 std::ptrdiff_t rhs);
440
441/// Return the distance from the specified `rhs` iterator to the specified `lhs` iterator.
442///
443/// \pre The behavior is undefined unless `lhs` and `rhs` are iterators into the same underlying sequence.
444///
445/// \note Note that the result might
446/// be negative.
447template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
448std::ptrdiff_t
451
452/// Return `true` if (1) the specified `lhs` iterator refers to an element
453/// before the specified `rhs` iterator in the iteration sequence, or (2)
454/// `rhs` (and not `lhs`) has the past-the-end value for an iterator over this sequence, and `false` otherwise.
455///
456/// \pre The behavior is undefined unless
457/// `lhs` and `rhs` are iterators into the same underlying sequence.
458template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
461
462/// Return `true` if (1) the specified `lhs` iterator refers to an element
463/// after the specified `rhs` iterator in the iteration sequence, or (2)
464/// `lhs` (and not `rhs`) has the past-the-end value for an iterator over this sequence, and `false` otherwise.
465///
466/// \pre The behavior is undefined unless
467/// `lhs` and `rhs` are iterators into the same underlying sequence.
468template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
471
472/// Return `true` if (1) the specified `lhs` iterator has the same value as
473/// the specified `rhs` iterator, or (2) `lhs` refers to an element before
474/// `rhs` in the iteration sequence, or (3) `rhs` has the past-the-end value
475/// for an iterator over this sequence, and `false` otherwise.
476///
477/// \pre The behavior is undefined unless `lhs` and `rhs` are iterators into the same
478/// underlying sequence.
479template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
482
483/// Return `true` if (1) the specified `lhs` iterator has the same value as
484/// the specified `rhs` iterator, or (2) `lhs` has the past-the-end value
485/// for an iterator over this sequence, or (3) `lhs` refers to an element
486/// after `rhs` in the iteration sequence, and `false` otherwise.
487///
488/// \pre The behavior is undefined unless `lhs` and `rhs` are iterators into the same
489/// underlying sequence.
490template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
493
494// ============================================================================
495// INLINE FUNCTION DEFINITIONS
496// ============================================================================
497
498 //----------------------------------
499 // class RandomAccessIterator
500 //----------------------------------
501
502// CREATORS
503template <class T, class ITER_IMP, class TAG_TYPE>
504inline
508
509template <class T, class ITER_IMP, class TAG_TYPE>
510inline
512RandomAccessIterator(const ITER_IMP& implementation)
513: BidirectionalIterator<T,ITER_IMP,TAG_TYPE>(implementation)
514{
515}
516
517template <class T, class ITER_IMP, class TAG_TYPE>
518inline
525
526// MANIPULATORS
527template <class T, class ITER_IMP, class TAG_TYPE>
528inline
532{
533 this->imp() = other.imp();
534 return *this;
535}
536
537template <class T, class ITER_IMP, class TAG_TYPE>
538inline
541{
542 ++this->imp();
543 return *this;
544}
545
546template <class T, class ITER_IMP, class TAG_TYPE>
547inline
550{
551 --this->imp();
552 return *this;
553}
554
555template <class T, class ITER_IMP, class TAG_TYPE>
556inline
559{
560 this->imp() += offset;
561 return *this;
562}
563
564template <class T, class ITER_IMP, class TAG_TYPE>
565inline
568{
569 this->imp() += -offset;
570 return *this;
571}
572
573// ACCESSORS
574template <class T, class ITER_IMP, class TAG_TYPE>
575inline
577 difference_type index) const
578{
580 tmp += index;
581 return *tmp;
582}
583
584} // close package namespace
585
586// FREE OPERATORS
587template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
588inline
589bool bslstl::operator==(const RandomAccessIterator<T1,ITER_IMP,TAG_TYPE>& lhs,
590 const RandomAccessIterator<T2,ITER_IMP,TAG_TYPE>& rhs)
591{
592 return lhs.imp() == rhs.imp();
593}
594
595template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
596inline
597bool bslstl::operator!=(const RandomAccessIterator<T1,ITER_IMP,TAG_TYPE>& lhs,
598 const RandomAccessIterator<T2,ITER_IMP,TAG_TYPE>& rhs)
599{
600 return !(lhs == rhs);
601}
602
603template <class T, class ITER_IMP, class TAG_TYPE>
604inline
606bslstl::operator++(RandomAccessIterator<T,ITER_IMP,TAG_TYPE>& iter, int)
607{
608 RandomAccessIterator<T,ITER_IMP,TAG_TYPE> tmp(iter);
609 ++iter;
610 return tmp;
611}
612
613template <class T, class ITER_IMP, class TAG_TYPE>
614inline
616bslstl::operator--(RandomAccessIterator<T,ITER_IMP,TAG_TYPE>& iter, int)
617{
618 RandomAccessIterator<T,ITER_IMP,TAG_TYPE> tmp(iter);
619 --iter;
620 return tmp;
621}
622
623template <class T, class ITER_IMP, class TAG_TYPE>
624inline
626bslstl::operator+(const RandomAccessIterator<T,ITER_IMP,TAG_TYPE>& lhs,
627 std::ptrdiff_t rhs)
628{
629 RandomAccessIterator<T,ITER_IMP,TAG_TYPE> result(lhs);
630 result += rhs;
631 return result;
632}
633
634template <class T, class ITER_IMP, class TAG_TYPE>
635inline
637bslstl::operator+(std::ptrdiff_t lhs,
638 const RandomAccessIterator<T,ITER_IMP,TAG_TYPE>& rhs)
639{
640 return rhs + lhs;
641}
642
643template <class T, class ITER_IMP, class TAG_TYPE>
644inline
646bslstl::operator-(const RandomAccessIterator<T,ITER_IMP,TAG_TYPE>& lhs,
647 std::ptrdiff_t rhs)
648{
649 return lhs + -rhs;
650}
651
652template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
653inline
654std::ptrdiff_t bslstl::operator-(
655 const RandomAccessIterator<T1,ITER_IMP,TAG_TYPE>& lhs,
656 const RandomAccessIterator<T2,ITER_IMP,TAG_TYPE>& rhs)
657{
658 return lhs.imp() - rhs.imp();
659}
660
661template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
662inline
663bool bslstl::operator<(const RandomAccessIterator<T1,ITER_IMP,TAG_TYPE>& lhs,
664 const RandomAccessIterator<T2,ITER_IMP,TAG_TYPE>& rhs)
665{
666 return lhs.imp() < rhs.imp();
667}
668
669template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
670inline
671bool bslstl::operator>(const RandomAccessIterator<T1,ITER_IMP,TAG_TYPE>& lhs,
672 const RandomAccessIterator<T2,ITER_IMP,TAG_TYPE>& rhs)
673{
674 return rhs < lhs;
675}
676
677template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
678inline
679bool bslstl::operator<=(const RandomAccessIterator<T1,ITER_IMP,TAG_TYPE>& lhs,
680 const RandomAccessIterator<T2,ITER_IMP,TAG_TYPE>& rhs)
681{
682 return !(rhs < lhs);
683}
684
685template <class T1, class T2, class ITER_IMP, class TAG_TYPE>
686inline
687bool bslstl::operator>=(const RandomAccessIterator<T1,ITER_IMP,TAG_TYPE>& lhs,
688 const RandomAccessIterator<T2,ITER_IMP,TAG_TYPE>& rhs)
689{
690 return !(lhs < rhs);
691}
692
693#ifndef BDE_OPENSOURCE_PUBLICATION // BACKWARD_COMPATIBILITY
694// ============================================================================
695// BACKWARD COMPATIBILITY
696// ============================================================================
697
698#ifdef bslstl_RandomAccessIterator
699#undef bslstl_RandomAccessIterator
700#endif
701/// This alias is defined for backward compatibility.
702#define bslstl_RandomAccessIterator bslstl::RandomAccessIterator
703#endif // BDE_OPENSOURCE_PUBLICATION -- BACKWARD_COMPATIBILITY
704
705
706
707#endif
708
709// ----------------------------------------------------------------------------
710// Copyright 2013 Bloomberg Finance L.P.
711//
712// Licensed under the Apache License, Version 2.0 (the "License");
713// you may not use this file except in compliance with the License.
714// You may obtain a copy of the License at
715//
716// http://www.apache.org/licenses/LICENSE-2.0
717//
718// Unless required by applicable law or agreed to in writing, software
719// distributed under the License is distributed on an "AS IS" BASIS,
720// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
721// See the License for the specific language governing permissions and
722// limitations under the License.
723// ----------------------------- END-OF-FILE ----------------------------------
724
725/** @} */
726/** @} */
727/** @} */
Definition bslstl_bidirectionaliterator.h:268
ITER_IMP & imp()
Return a modifiable reference to the implementation object.
Definition bslstl_forwarditerator.h:366
Definition bslstl_randomaccessiterator.h:282
std::ptrdiff_t difference_type
Definition bslstl_randomaccessiterator.h:292
RandomAccessIterator & operator++()
Definition bslstl_randomaccessiterator.h:540
std::random_access_iterator_tag iterator_category
Definition bslstl_randomaccessiterator.h:295
T & operator[](difference_type index) const
Definition bslstl_randomaccessiterator.h:576
RandomAccessIterator & operator=(const RandomAccessIterator< UnCvqT, ITER_IMP, TAG_TYPE > &other)
Definition bslstl_randomaccessiterator.h:530
RandomAccessIterator & operator-=(difference_type offset)
Definition bslstl_randomaccessiterator.h:567
UnCvqT value_type
Definition bslstl_randomaccessiterator.h:291
T & reference
Definition bslstl_randomaccessiterator.h:294
T * pointer
Definition bslstl_randomaccessiterator.h:293
RandomAccessIterator & operator+=(difference_type offset)
Definition bslstl_randomaccessiterator.h:558
RandomAccessIterator()
Definition bslstl_randomaccessiterator.h:505
RandomAccessIterator & operator--()
Definition bslstl_randomaccessiterator.h:549
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
Definition bslstl_algorithm.h:84
bool operator>=(const RandomAccessIterator< T1, ITER_IMP, TAG_TYPE > &lhs, const RandomAccessIterator< T2, ITER_IMP, TAG_TYPE > &rhs)
RandomAccessIterator< T, ITER_IMP, TAG_TYPE > operator-(const RandomAccessIterator< T, ITER_IMP, TAG_TYPE > &lhs, std::ptrdiff_t rhs)
bool operator<(const RandomAccessIterator< T1, ITER_IMP, TAG_TYPE > &lhs, const RandomAccessIterator< T2, ITER_IMP, TAG_TYPE > &rhs)
BidirectionalIterator< T, ITER_IMP, TAG_TYPE > operator--(BidirectionalIterator< T, ITER_IMP, TAG_TYPE > &iter, int)
bool operator<=(const RandomAccessIterator< T1, ITER_IMP, TAG_TYPE > &lhs, const RandomAccessIterator< T2, ITER_IMP, TAG_TYPE > &rhs)
BidirectionalIterator< T, ITER_IMP, TAG_TYPE > operator++(BidirectionalIterator< T, ITER_IMP, TAG_TYPE > &iter, int)
bool operator==(const BidirectionalIterator< T1, ITER_IMP, TAG_TYPE > &lhs, const BidirectionalIterator< T2, ITER_IMP, TAG_TYPE > &rhs)
RandomAccessIterator< T, ITER_IMP, TAG_TYPE > operator+(const RandomAccessIterator< T, ITER_IMP, TAG_TYPE > &lhs, std::ptrdiff_t rhs)
bool operator>(const RandomAccessIterator< T1, ITER_IMP, TAG_TYPE > &lhs, const RandomAccessIterator< T2, ITER_IMP, TAG_TYPE > &rhs)
bool operator!=(const BidirectionalIterator< T1, ITER_IMP, TAG_TYPE > &lhs, const BidirectionalIterator< T2, ITER_IMP, TAG_TYPE > &rhs)
remove_const< typenameremove_volatile< t_TYPE >::type >::type type
Definition bslmf_removecv.h:128