---
name: "shevek_crefptr"
section: "3"
platform: "linux"
package: "libshevek-doc"
version: "1.4-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/shevek_crefptr"
---

# shevek\_crefptr(3)

Keep a pointer to an object derived from crefbase.

## NAME

shevek::crefptr\< \_T \> -

Keep a pointer to an object derived from crefbase.

## SYNOPSIS

`#include <crefptr.hh>`

Inherits shevek::crefbase::\_ptr.

### Public Member Functions

**crefptr** (**crefbase** \*target=NULL, **crefbase** \*owner=NULL)\
 *Create a new pointer. If this pointer is stored inside a crefbase-derived object, make sure to set the owner.*  \_T & **operator\*** () const \
 *Dereference the pointer.*  \_T \* **operator-\>** () const \
 *Dereference the pointer.*  bool **operator==** (**crefptr**\< \_T \> const &that) const \
 *Test if two pointers refer to the same object.*  bool **operator!=** (**crefptr**\< \_T \> const &that) const \
 *Test if two pointers don't refer to the same object.*  template\<typename \_R \> \_R \* **cast\_dynamic** () const \
 *Create a new pointer from this one, up- or downcast. Normally, this is used to fill a new crefptr.*  **operator \_T \*** () const \
 *Implicit pointer conversion.*  **crefptr**\< \_T \> **init** (int code=0)\
 *Allow the pointer to be destroyed. See* **crefbase::init\_done** *for details.*

## Detailed Description

### template\<typename \_T\>class shevek::crefptr\< \_T \>

Keep a pointer to an object derived from crefbase.

## Author

Generated automatically by Doxygen for libshevek from the source code.
