---
name: "__gnu_debug::_Safe_container"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_debug::_Safe_container"
---

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

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\>

Inherited by **\_\_gnu\_debug::basic\_string\< char \>**, **\_\_gnu\_debug::basic\_string\< wchar\_t \>**, **\_\_gnu\_debug::basic\_string\< char16\_t \>**, **\_\_gnu\_debug::basic\_string\< char32\_t \>**, **std::\_\_debug::forward\_list\< \_Tp, \_Alloc \>**, **std::\_\_debug::iterator\< \_Tp, \_Alloc \>**, **\_\_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\
 constexpr **\_Safe\_container** (\_Safe\_container &&\_\_x, const \_Alloc &\_\_a)\
 **\_Safe\_container** (const \_Safe\_container &)=default\
 constexpr void **\_M\_swap** (const \_Safe\_container &\_\_x) const noexcept\
 constexpr \_Safe\_container & **operator=** (\_Safe\_container &&\_\_x) noexcept\
 constexpr \_Safe\_container & **operator=** (const \_Safe\_container &) noexcept=default\

## 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.
