---
name: "__gnu_pbds::container_traits"
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_pbds::container_traits/3cxx"
---

# \_\_gnu\_pbds::container\_traits(3cxx)

Container traits.

## NAME

\_\_gnu\_pbds::container\_traits\< Cntnr \> - Container traits.

## SYNOPSIS

`#include <tag_and_trait.hpp>`

Inherits **\_\_gnu\_pbds::container\_traits\_base\< Cntnr::container\_category \>**.

### Public Types

enum { **order\_preserving**, **erase\_can\_throw**, **split\_join\_can\_throw**, **reverse\_iteration** }\
 typedef **container\_traits\_base**\< container\_category \> **base\_type**\
 typedef Cntnr::container\_category **container\_category**\
 typedef Cntnr **container\_type**\
 typedef base\_type::invalidation\_guarantee **invalidation\_guarantee**\

## Detailed Description

### template\<typename Cntnr\>

struct \_\_gnu\_pbds::container\_traits\< Cntnr \>"Container traits.

## Member Enumeration Documentation

### template\<typename Cntnr \> anonymous enum

**Enumerator**

- *order\_preserving*

  *True only if Cntnr objects guarantee storing keys by order.*

- *erase\_can\_throw*

  *True only if erasing a key can throw.*

- *split\_join\_can\_throw*

  *True only if split or join operations can throw.*

- *reverse\_iteration*

  *True only reverse iterators are supported.*

## Author

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