---
name: "__gnu_debug::def_vector"
section: "3"
platform: "linux"
package: "libstdc++6-doc"
version: "3.4.6-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_debug::def_vector"
---

# \_\_gnu\_debug::def\_vector(3)

## NAME

\_\_gnu\_debug\_def::vector -

## SYNOPSIS

Inherits **std::vector\< Type, Allocator \>**, and **\_\_gnu\_debug::Safe\_sequence\< Sequence \>\< \_\_gnu\_debug\_def::vector\< Type, Allocator \> \>**.

### Public Types

typedef **Base::reference** **reference**\
 typedef **Base::const\_reference** **const\_reference**\
 typedef **\_\_gnu\_debug::Safe\_iterator**\< typename **Base::iterator**, **vector** \> **iterator**\
 typedef **\_\_gnu\_debug::Safe\_iterator**\< typename **Base::const\_iterator**, **vector** \> **const\_iterator**\
 typedef **Base::size\_type** **size\_type**\
 typedef **Base::difference\_type** **difference\_type**\
 typedef Type **value\_type**\
 typedef Allocator **allocator\_type**\
 typedef Allocator::pointer **pointer**\
 typedef Allocator::const\_pointer **const\_pointer**\
 typedef **std::reverse\_iterator**\< **iterator** \> **reverse\_iterator**\
 typedef **std::reverse\_iterator**\< **const\_iterator** \> **const\_reverse\_iterator**\

### Public Member Functions

**vector** (const Allocator &a=Allocator())\
 **vector** (**size\_type** n, const Type &value=Type(), const Allocator &a=Allocator())\
 template\<class InputIterator\> **vector** (InputIterator first, InputIterator last, const Allocator &a=Allocator())\
 **vector** (const **vector**\< Type, Allocator \> &x)\
 **vector** (const **Base** &x)\
 *Construction from a release-mode vector.*  **~vector** ()\
 **vector**\< Type, Allocator \> & **operator=** (const **vector**\< Type, Allocator \> &x)\
 template\<typename InputIterator\> void **assign** (InputIterator first, InputIterator last)\
 *Assigns a range to a vector.*  void **assign** (**size\_type** n, const Type &\_\_u)\
 **iterator** **begin** ()\
 **const\_iterator** **begin** () const\
 **iterator** **end** ()\
 **const\_iterator** **end** () const\
 **reverse\_iterator** **rbegin** ()\
 **const\_reverse\_iterator** **rbegin** () const\
 **reverse\_iterator** **rend** ()\
 **const\_reverse\_iterator** **rend** () const\
 void **resize** (**size\_type** sz, Type c=Type())\
 void **reserve** (**size\_type** n)\
 **reference** **operator\[\]** (**size\_type** n)\
 **const\_reference** **operator\[\]** (**size\_type** n) const \
 **reference** **front** ()\
 **const\_reference** **front** () const\
 **reference** **back** ()\
 **const\_reference** **back** () const\
 void **push\_back** (const Type &x)\
 *Add data to the end of the vector.*  void **pop\_back** ()\
 *Removes last element.*  **iterator** **insert** (**iterator** position, const Type &x)\
 void **insert** (**iterator** position, **size\_type** n, const Type &x)\
 template\<class InputIterator\> void **insert** (**iterator** position, InputIterator first, InputIterator last)\
 **iterator** **erase** (**iterator** position)\
 **iterator** **erase** (**iterator** first, **iterator** last)\
 void **swap** (**vector**\< Type, Allocator \> &x)\
 void **clear** ()\
 **Base** & **M\_base** ()\
 const **Base** & **M\_base** () const\
 void **assign** (**size\_type** n, const **value\_type** &\_\_val)\
 *Assigns a given value to a vector.*  **size\_type** **size** () const\
 **size\_type** **max\_size** () const\
 void **resize** (**size\_type** new\_size, const **value\_type** &x)\
 *Resizes the vector to the specified number of elements.*  void **resize** (**size\_type** new\_size)\
 *Resizes the vector to the specified number of elements.*  **size\_type** **capacity** () const\
 bool **empty** () const\
 void **reserve** (**size\_type** n)\
 *Attempt to preallocate enough memory for specified number of elements.*  **reference** **operator\[\]** (**size\_type** n)\
 *Subscript access to the data contained in the vector.*  **const\_reference** **operator\[\]** (**size\_type** n) const \
 *Subscript access to the data contained in the vector.*  **reference** **at** (**size\_type** n)\
 *Provides access to the data contained in the vector.*  **const\_reference** **at** (**size\_type** n) const \
 *Provides access to the data contained in the vector.*  **iterator** **insert** (**iterator** position, const **value\_type** &x)\
 *Inserts given value into vector before specified iterator.*  void **insert** (**iterator** position, **size\_type** n, const **value\_type** &x)\
 *Inserts a number of copies of given data into the vector.*  void **insert** (**iterator** position, InputIterator first, InputIterator last)\
 *Inserts a range into the vector.*  **iterator** **erase** (**iterator** position)\
 *Remove element at given position.*  **iterator** **erase** (**iterator** first, **iterator** last)\
 *Remove a range of elements.*  void **swap** (**vector** &x)\
 *Swaps data with another vector.*  template\<typename Predicate\> void **M\_invalidate\_if** (Predicate pred)\
 template\<typename Iterator\> void **M\_transfer\_iter** (const Safe\_iterator\< Iterator, Sequence \> &x)\
 void **M\_invalidate\_all** () const\

### Public Attributes

Safe\_iterator\_base \* **M\_iterators**\
 *The list of mutable iterators that reference this container.*  Safe\_iterator\_base \* **M\_const\_iterators**\
 *The list of constant iterators that reference this container.*  unsigned int **M\_version**\
 *The container version number. This number may never be 0.*

### Protected Member Functions

void **M\_range\_check** (**size\_type** n) const \
 **pointer** **M\_allocate\_and\_copy** (**size\_type** n, ForwardIterator first, ForwardIterator last)\
 void **M\_initialize\_dispatch** (Integer n, Integer value, **\_\_true\_type**)\
 void **M\_initialize\_dispatch** (InputIterator first, InputIterator last, **\_\_false\_type**)\
 void **M\_range\_initialize** (InputIterator first, InputIterator last, input\_iterator\_tag)\
 void **M\_range\_initialize** (ForwardIterator first, ForwardIterator last, forward\_iterator\_tag)\
 void **M\_assign\_dispatch** (Integer n, Integer \_\_val, **\_\_true\_type**)\
 void **M\_assign\_dispatch** (InputIterator first, InputIterator last, **\_\_false\_type**)\
 void **M\_insert\_dispatch** (**iterator** position, Integer n, Integer \_\_val, **\_\_true\_type**)\
 void **M\_insert\_dispatch** (**iterator** position, InputIterator first, InputIterator last, **\_\_false\_type**)\
 **allocator\_type** **get\_allocator** () const\
 Type \* **M\_allocate** (size\_t n)\
 void **M\_deallocate** (Type \*\_\_p, size\_t n)\
 void **M\_detach\_all** ()\
 void **M\_detach\_singular** ()\
 void **M\_revalidate\_singular** ()\
 void **M\_swap** (Safe\_sequence\_base &x)\

### Protected Attributes

Vector\_impl **M\_impl**\

### Private Types

typedef **std::vector**\< Type, Allocator \> **Base**\
 typedef **\_\_gnu\_debug::Safe\_sequence**\< **vector** \> **Safe\_base**\
 typedef **Base::const\_iterator** **Base\_const\_iterator**\
 typedef **\_\_gnu\_debug::After\_nth\_from**\< **Base\_const\_iterator** \> **After\_nth**\

### Private Member Functions

bool **M\_requires\_reallocation** (**size\_type** \_\_elements)\
 void **M\_update\_guaranteed\_capacity** ()\

### Private Attributes

**size\_type** **M\_guaranteed\_capacity**\

## Detailed Description

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> class \_\_gnu\_debug\_def::vector\< Type, Allocator \>

Definition at line 43 of file debug/vector.

## Constructor & Destructor Documentation

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> \_\_gnu\_debug\_def::vector\< Type, Allocator \>::vector (const Base & x)` [inline]`

Construction from a release-mode vector.

Definition at line 92 of file debug/vector.

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> \_\_gnu\_debug\_def::vector\< Type, Allocator \>::~vector ()` [inline]`

The dtor only erases the elements, and note that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibilty.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 95 of file debug/vector.

## Member Function Documentation

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> template\<typename InputIterator\> void \_\_gnu\_debug\_def::vector\< Type, Allocator \>::assign (InputIterator first, InputIterator last)` [inline]`

Assigns a range to a vector.

**Parameters:**

*first* An input iterator. \
 *last* An input iterator.

This function fills a vector with copies of the elements in the range \[first,last).

Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned. Old data may be lost.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 108 of file debug/vector.

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> iterator \_\_gnu\_debug\_def::vector\< Type, Allocator \>::begin ()` [inline]`

Returns a read/write iterator that points to the first element in the vector. Iteration is done in ordinary element order.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 128 of file debug/vector.

Referenced by \_\_gnu\_debug\_def::vector\< Type, Allocator \>::erase(), \_\_gnu\_debug\_def::vector\< Type, Allocator \>::insert(), \_\_gnu\_debug\_def::vector\< Type, Allocator \>::rend(), and \_\_gnu\_debug\_def::vector\< Type, Allocator \>::resize().

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> const\_iterator \_\_gnu\_debug\_def::vector\< Type, Allocator \>::begin () const` [inline]`

Returns a read-only (constant) iterator that points to the first element in the vector. Iteration is done in ordinary element order.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 132 of file debug/vector.

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> iterator \_\_gnu\_debug\_def::vector\< Type, Allocator \>::end ()` [inline]`

Returns a read/write iterator that points one past the last element in the vector. Iteration is done in ordinary element order.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 136 of file debug/vector.

Referenced by \_\_gnu\_debug\_def::vector\< Type, Allocator \>::pop\_back(), and \_\_gnu\_debug\_def::vector\< Type, Allocator \>::rbegin().

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> const\_iterator \_\_gnu\_debug\_def::vector\< Type, Allocator \>::end () const` [inline]`

Returns a read-only (constant) iterator that points one past the last element in the vector. Iteration is done in ordinary element order.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 140 of file debug/vector.

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> reverse\_iterator \_\_gnu\_debug\_def::vector\< Type, Allocator \>::rbegin ()` [inline]`

Returns a read/write reverse iterator that points to the last element in the vector. Iteration is done in reverse element order.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 144 of file debug/vector.

References \_\_gnu\_debug\_def::vector\< Type, Allocator \>::end().

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> const\_reverse\_iterator \_\_gnu\_debug\_def::vector\< Type, Allocator \>::rbegin () const` [inline]`

Returns a read-only (constant) reverse iterator that points to the last element in the vector. Iteration is done in reverse element order.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 148 of file debug/vector.

References \_\_gnu\_debug\_def::vector\< Type, Allocator \>::end().

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> reverse\_iterator \_\_gnu\_debug\_def::vector\< Type, Allocator \>::rend ()` [inline]`

Returns a read/write reverse iterator that points to one before the first element in the vector. Iteration is done in reverse element order.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 152 of file debug/vector.

References \_\_gnu\_debug\_def::vector\< Type, Allocator \>::begin().

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> const\_reverse\_iterator \_\_gnu\_debug\_def::vector\< Type, Allocator \>::rend () const` [inline]`

Returns a read-only (constant) reverse iterator that points to one before the first element in the vector. Iteration is done in reverse element order.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 156 of file debug/vector.

References \_\_gnu\_debug\_def::vector\< Type, Allocator \>::begin().

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> reference \_\_gnu\_debug\_def::vector\< Type, Allocator \>::front ()` [inline]`

Returns a read/write reference to the data at the first element of the vector.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 206 of file debug/vector.

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> const\_reference \_\_gnu\_debug\_def::vector\< Type, Allocator \>::front () const` [inline]`

Returns a read-only (constant) reference to the data at the first element of the vector.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 213 of file debug/vector.

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> reference \_\_gnu\_debug\_def::vector\< Type, Allocator \>::back ()` [inline]`

Returns a read/write reference to the data at the last element of the vector.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 220 of file debug/vector.

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> const\_reference \_\_gnu\_debug\_def::vector\< Type, Allocator \>::back () const` [inline]`

Returns a read-only (constant) reference to the data at the last element of the vector.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 227 of file debug/vector.

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> void \_\_gnu\_debug\_def::vector\< Type, Allocator \>::push\_back (const Type & x)` [inline]`

Add data to the end of the vector.

**Parameters:**

*x* Data to be added.

This is a typical stack operation. The function creates an element at the end of the vector and assigns the given data to it. Due to the nature of a vector this operation can be done in constant time if the vector has preallocated space available.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 235 of file debug/vector.

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> void \_\_gnu\_debug\_def::vector\< Type, Allocator \>::pop\_back ()` [inline]`

Removes last element.

This is a typical stack operation. It shrinks the vector by one.

Note that no data is returned, and if the last element's data is needed, it should be retrieved before **pop\_back()** is called.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 245 of file debug/vector.

References \_\_gnu\_debug\_def::vector\< Type, Allocator \>::end().

### template\<typename Type, typename Allocator = std::allocator\<Type\>\> void \_\_gnu\_debug\_def::vector\< Type, Allocator \>::clear ()` [inline]`

Erases all the elements. Note that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibilty.

Reimplemented from **std::vector\< Type, Allocator \>**.

Definition at line 336 of file debug/vector.

### void std::vector\< Type , Allocator \>::assign (size\_type n, const value\_type & \_\_val)` [inline, inherited]`

Assigns a given value to a vector.

**Parameters:**

*n* Number of elements to be assigned. \
 *val* Value to be assigned.

This function fills a vector with *n* copies of the given value. Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned. Old data may be lost.

Definition at line 280 of file stl\_vector.h.

### size\_type std::vector\< Type , Allocator \>::size () const` [inline, inherited]`

Returns the number of elements in the vector.

Definition at line 375 of file stl\_vector.h.

Referenced by \_\_gnu\_debug\_def::vector\< Type, Allocator \>::resize().

### size\_type std::vector\< Type , Allocator \>::max\_size (void) const` [inline, inherited]`

Returns the **size()** of the largest possible vector.

Definition at line 379 of file stl\_vector.h.

### void std::vector\< Type , Allocator \>::resize (size\_type new\_size, const value\_type & x)` [inline, inherited]`

Resizes the vector to the specified number of elements.

**Parameters:**

*new\_size* Number of elements the vector should contain. \
 *x* Data with which new elements should be populated.

This function will resize the vector to the specified number of elements. If the number is smaller than the vector's current size the vector is truncated, otherwise the vector is extended and new elements are populated with given data.

Definition at line 393 of file stl\_vector.h.

### void std::vector\< Type , Allocator \>::resize (size\_type new\_size)` [inline, inherited]`

Resizes the vector to the specified number of elements.

**Parameters:**

*new\_size* Number of elements the vector should contain.

This function will resize the vector to the specified number of elements. If the number is smaller than the vector's current size the vector is truncated, otherwise the vector is extended and new elements are default-constructed.

Definition at line 412 of file stl\_vector.h.

### size\_type std::vector\< Type , Allocator \>::capacity () const` [inline, inherited]`

Returns the total number of elements that the vector can hold before needing to allocate more memory.

Definition at line 419 of file stl\_vector.h.

Referenced by \_\_gnu\_debug\_def::vector\< Type, Allocator \>::M\_requires\_reallocation().

### bool std::vector\< Type , Allocator \>::empty () const` [inline, inherited]`

Returns true if the vector is empty. (Thus **begin()** would equal **end()**.)

Definition at line 427 of file stl\_vector.h.

### void std::vector\< Type , Allocator \>::reserve (size\_type n)` [inherited]`

Attempt to preallocate enough memory for specified number of elements.

**Parameters:**

*n* Number of elements required.

**Exceptions:**

**std::length\_error If** *n* **exceeds max\_size().**

**This function attempts to reserve enough memory for the vector to hold the specified number of elements. If the number requested is more than max\_size(), length\_error is thrown.**

**The advantage of this function is that if optimal code is a necessity and the user can determine the number of elements that will be required, the user can reserve the memory in advance, and thus prevent a possible reallocation of memory and copying of vector data.**

### reference std::vector\< Type , Allocator \>::operator\[\] (size\_type n)` [inline, inherited]`

**Subscript access to the data contained in the vector.**

**Parameters:**

*n* **The index of the element for which data should be accessed.**

**Returns:**

**Read/write reference to data.**

**This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and out\_of\_range lookups are not defined. (For checked lookups see at().)**

**Definition at line 462 of file stl\_vector.h.**

### const\_reference std::vector\< Type , Allocator \>::operator\[\] (size\_type n) const` [inline, inherited]`

**Subscript access to the data contained in the vector.**

**Parameters:**

*n* **The index of the element for which data should be accessed.**

**Returns:**

**Read-only (constant) reference to data.**

**This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and out\_of\_range lookups are not defined. (For checked lookups see at().)**

**Definition at line 476 of file stl\_vector.h.**

### reference std::vector\< Type , Allocator \>::at (size\_type n)` [inline, inherited]`

**Provides access to the data contained in the vector.**

**Parameters:**

*n* **The index of the element for which data should be accessed.**

**Returns:**

**Read/write reference to data.**

**Exceptions:**

**std::out\_of\_range If** *n* **is an invalid index.**

**This function provides for safer data access. The parameter is first checked that it is in the range of the vector. The function throws out\_of\_range if the check fails.**

**Definition at line 500 of file stl\_vector.h.**

### const\_reference std::vector\< Type , Allocator \>::at (size\_type n) const` [inline, inherited]`

**Provides access to the data contained in the vector.**

**Parameters:**

*n* **The index of the element for which data should be accessed.**

**Returns:**

**Read-only (constant) reference to data.**

**Exceptions:**

**std::out\_of\_range If** *n* **is an invalid index.**

**This function provides for safer data access. The parameter is first checked that it is in the range of the vector. The function throws out\_of\_range if the check fails.**

**Definition at line 514 of file stl\_vector.h.**

### iterator std::vector\< Type , Allocator \>::insert (iterator position, const value\_type & x)` [inherited]`

**Inserts given value into vector before specified iterator.**

**Parameters:**

*position* **An iterator into the vector.** \
 *x* **Data to be inserted.**

**Returns:**

**An iterator that points to the inserted data.**

**This function will insert a copy of the given value before the specified location. Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.**

### void std::vector\< Type , Allocator \>::insert (iterator position, size\_type n, const value\_type & x)` [inline, inherited]`

**Inserts a number of copies of given data into the vector.**

**Parameters:**

*position* **An iterator into the vector.** \
 *n* **Number of elements to be inserted.** \
 *x* **Data to be inserted.**

**This function will insert a specified number of copies of the given data before the location specified by** *position***.**

**Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.**

**Definition at line 611 of file stl\_vector.h.**

### void std::vector\< Type , Allocator \>::insert (iterator position, InputIterator first, InputIterator last)` [inline, inherited]`

**Inserts a range into the vector.**

**Parameters:**

*position* **An iterator into the vector.** \
 *first* **An input iterator.** \
 *last* **An input iterator.**

**This function will insert copies of the data in the range \[first,last) into the vector before the location specified by** *pos***.**

**Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.**

**Definition at line 630 of file stl\_vector.h.**

### iterator std::vector\< Type , Allocator \>::erase (iterator position)` [inherited]`

**Remove element at given position.**

**Parameters:**

*position* **Iterator pointing to element to be erased.**

**Returns:**

**An iterator pointing to the next element (or end()).**

**This function will erase the element at the given position and thus shorten the vector by one.**

**Note This operation could be expensive and if it is frequently used the user should consider using std::list. The user is also cautioned that this function only erases the element, and that if the element is itself a pointer, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibilty.**

### iterator std::vector\< Type , Allocator \>::erase (iterator first, iterator last)` [inherited]`

**Remove a range of elements.**

**Parameters:**

*first* **Iterator pointing to the first element to be erased.** \
 *last* **Iterator pointing to one past the last element to be erased.**

**Returns:**

**An iterator pointing to the element pointed to by** *last* **prior to erasing (or end()).**

**This function will erase the elements in the range \[first,last) and shorten the vector accordingly.**

**Note This operation could be expensive and if it is frequently used the user should consider using std::list. The user is also cautioned that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibilty.**

### void std::vector\< Type , Allocator \>::swap (vector\< Type, Allocator \> & x)` [inline, inherited]`

**Swaps data with another vector.**

**Parameters:**

*x* **A vector of the same element and allocator types.**

**This exchanges the elements between two vectors in constant time. (Three pointers, so it should be quite fast.) Note that the global std::swap() function is specialized such that std::swap(v1,v2) will feed to this function.**

**Definition at line 687 of file stl\_vector.h.**

**References std::swap().**

### template\<typename Sequence\> template\<typename Predicate\> void \_\_gnu\_debug::Safe\_sequence\< Sequence \>::M\_invalidate\_if (Predicate pred)` [inherited]`

**Invalidates all iterators** `x` **that reference this sequence, are not singular, and for which** `pred(x)` **returns** `true`**. The user of this routine should be careful not to make copies of the iterators passed to** `pred`**, as the copies may interfere with the invalidation.**

**Definition at line 120 of file safe\_sequence.h.**

### template\<typename Sequence\> template\<typename Iterator\> void \_\_gnu\_debug::Safe\_sequence\< Sequence \>::M\_transfer\_iter (const Safe\_iterator\< Iterator, Sequence \> & x)` [inherited]`

**Transfers all iterators that reference this memory location to this sequence from whatever sequence they are attached to.**

**Definition at line 152 of file safe\_sequence.h.**

### void \_\_gnu\_debug::Safe\_sequence\_base::M\_detach\_all ()` [protected, inherited]`

**Detach all iterators, leaving them singular.**

**Definition at line 114 of file debug.cc.**

### void \_\_gnu\_debug::Safe\_sequence\_base::M\_detach\_singular ()` [protected, inherited]`

**Detach all singular iterators.**

**Postcondition:**

**for all iterators i attached to this sequence, i-\>M\_version == M\_version.**

**Definition at line 133 of file debug.cc.**

### void \_\_gnu\_debug::Safe\_sequence\_base::M\_revalidate\_singular ()` [protected, inherited]`

**Revalidates all attached singular iterators. This method may be used to validate iterators that were invalidated before (but for some reasion, such as an exception, need to become valid again).**

**Definition at line 154 of file debug.cc.**

### void \_\_gnu\_debug::Safe\_sequence\_base::M\_swap (Safe\_sequence\_base & x)` [protected, inherited]`

**Swap this sequence with the given sequence. This operation also swaps ownership of the iterators, so that when the operation is complete all iterators that originally referenced one container now reference the other container.**

**Definition at line 172 of file debug.cc.**

**References \_\_gnu\_debug::swap().**

### void \_\_gnu\_debug::Safe\_sequence\_base::M\_invalidate\_all () const` [inline, inherited]`

**Invalidates all iterators.**

**Definition at line 202 of file safe\_base.h.**

## Member Data Documentation

### Safe\_iterator\_base\* \_\_gnu\_debug::Safe\_sequence\_base::M\_iterators` [inherited]`

**The list of mutable iterators that reference this container.**

**Definition at line 153 of file safe\_base.h.**

### Safe\_iterator\_base\* \_\_gnu\_debug::Safe\_sequence\_base::M\_const\_iterators` [inherited]`

**The list of constant iterators that reference this container.**

**Definition at line 156 of file safe\_base.h.**

### unsigned int \_\_gnu\_debug::Safe\_sequence\_base::M\_version` [mutable, inherited]`

**The container version number. This number may never be 0.**

**Definition at line 159 of file safe\_base.h.**

## Author

**Generated automatically by Doxygen for libstdc++-v3 Source from the source code.**
