---
name: "__gnu_cxx::_Caster"
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_cxx::_Caster"
---

# \_\_gnu\_cxx::\_Caster(3)

## NAME

\_\_gnu\_cxx::\_Caster\< \_ToType \>

## SYNOPSIS

\#include \<cast.h\>

### Public Types

typedef \_ToType::element\_type \* **type**\

## Detailed Description

### template\<typename \_ToType\>

struct \_\_gnu\_cxx::\_Caster\< \_ToType \>"These functions are here to allow containers to support non standard pointer types. For normal pointers, these resolve to the use of the standard cast operation. For other types the functions will perform the appropriate cast to/from the custom pointer class so long as that class meets the following conditions: 1) has a typedef element\_type which names tehe type it points to. 2) has a get() const method which returns element\_type\*. 3) has a constructor which can take one element\_type\* argument. This type supports the semantics of the pointer cast operators (below.)

## Author

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