---
name: "__gnu_debug::_Safe_vector"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_debug::_Safe_vector/3cxx"
---

# \_\_gnu\_debug::\_Safe\_vector(3cxx)

Base class for Debug Mode vector.

## NAME

\_\_gnu\_debug::\_Safe\_vector\< \_SafeSequence, \_BaseSequence \> - Base class for Debug Mode vector.

## SYNOPSIS

`#include <vector>`

Inherited by **std::\_\_debug::vector\< \_Tp, \_Allocator \>**.

### Protected Member Functions

**\_Safe\_vector** (**\_Safe\_vector** &&\_\_x) noexcept\
 **\_Safe\_vector** (const **\_Safe\_vector** &) noexcept\
 **\_Safe\_vector** (size\_type \_\_n) noexcept\
 bool **\_M\_requires\_reallocation** (size\_type \_\_elements) const noexcept\
 void **\_M\_update\_guaranteed\_capacity** () noexcept\
 **\_Safe\_vector** & **operator=** (**\_Safe\_vector** &&\_\_x) noexcept\
 **\_Safe\_vector** & **operator=** (const **\_Safe\_vector** &) noexcept\

### Protected Attributes

size\_type **\_M\_guaranteed\_capacity**\

## Detailed Description

### template\<typename \_SafeSequence, typename \_BaseSequence\>

class \_\_gnu\_debug::\_Safe\_vector\< \_SafeSequence, \_BaseSequence \>"Base class for Debug Mode vector.

Adds information about the guaranteed capacity, which is useful for detecting code which relies on non-portable implementation details of the libstdc++ reallocation policy.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
