---
name: "__gnu_debug::_Safe_container"
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_container/3cxx"
---

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

Safe class dealing with some allocator dependent operations.

## NAME

\_\_gnu\_debug::\_Safe\_container\< \_SafeContainer, \_Alloc, \_SafeBase, \_IsCxx11AllocatorAware \> - Safe class dealing with some allocator dependent operations.

## SYNOPSIS

`#include <safe_container.h>`

Inherits \_SafeBase\< \_SafeContainer \>.

Inherited by **\_\_gnu\_debug::basic\_string\< \_CharT, \_Traits, \_Allocator \>**, **std::\_\_debug::deque\< \_Tp, \_Allocator \>**, **std::\_\_debug::forward\_list\< \_Tp, \_Alloc \>**, **std::\_\_debug::list\< \_Tp, \_Allocator \>**, **std::\_\_debug::map\< \_Key, \_Tp, \_Compare, \_Allocator \>**, **std::\_\_debug::multimap\< \_Key, \_Tp, \_Compare, \_Allocator \>**, **std::\_\_debug::multiset\< \_Key, \_Compare, \_Allocator \>**, **std::\_\_debug::set\< \_Key, \_Compare, \_Allocator \>**, **std::\_\_debug::unordered\_map\< \_Key, \_Tp, \_Hash, \_Pred, \_Alloc \>**, **std::\_\_debug::unordered\_multimap\< \_Key, \_Tp, \_Hash, \_Pred, \_Alloc \>**, **std::\_\_debug::unordered\_multiset\< \_Value, \_Hash, \_Pred, \_Alloc \>**, **std::\_\_debug::unordered\_set\< \_Value, \_Hash, \_Pred, \_Alloc \>**, and **std::\_\_debug::vector\< \_Tp, \_Allocator \>**.

### Protected Member Functions

**\_Safe\_container** (**\_Safe\_container** &&)=default\
 **\_Safe\_container** (**\_Safe\_container** &&\_\_x, const \_Alloc &\_\_a)\
 **\_Safe\_container** (const **\_Safe\_container** &)=default\
 void **\_M\_swap** (**\_Safe\_container** &\_\_x) noexcept\
 **\_Safe\_container** & **operator=** (**\_Safe\_container** &&\_\_x) noexcept\
 **\_Safe\_container** & **operator=** (const **\_Safe\_container** &) noexcept\

## Detailed Description

### template\<typename \_SafeContainer, typename \_Alloc, template\< typename \> class \_SafeBase, bool \_IsCxx11AllocatorAware = true\>

class \_\_gnu\_debug::\_Safe\_container\< \_SafeContainer, \_Alloc, \_SafeBase, \_IsCxx11AllocatorAware \>"Safe class dealing with some allocator dependent operations.

## Author

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