---
name: "std::tr1::weak_ptr"
section: "3"
platform: "linux"
package: "libstdc++6-4.1-doc"
version: "4.1.1-21"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/std::tr1::weak_ptr"
---

# std::tr1::weak\_ptr(3)

## NAME

std::tr1::weak\_ptr -

## SYNOPSIS

## Detailed Description

### template\<typename \_Tp\> class std::tr1::weak\_ptr\< \_Tp \>

Definition at line 778 of file boost\_shared\_ptr.h.

### Public Types

typedef \_Tp **element\_type**\

### Public Member Functions

bool **expired** () const\
 **shared\_ptr**\< \_Tp \> **lock** () const\
 template\<typename \_Tp1\> **weak\_ptr** & **operator=** (const **shared\_ptr**\< \_Tp1 \> &r)\
 template\<typename \_Tp1\> **weak\_ptr** & **operator=** (const **weak\_ptr**\< \_Tp1 \> &r)\
 void **reset** ()\
 void **swap** (**weak\_ptr** &\_\_s)\
 long **use\_count** () const\
 template\<typename \_Tp1\> **weak\_ptr** (const **shared\_ptr**\< \_Tp1 \> &r)\
 template\<typename \_Tp1\> **weak\_ptr** (const **weak\_ptr**\< \_Tp1 \> &r)\
 **weak\_ptr** ()\

### Friends

class **enable\_shared\_from\_this\< \_Tp \>**\
 template\<typename \_Tp1\> bool **operator\<** (const **weak\_ptr** &\_\_lhs, const **weak\_ptr**\< \_Tp1 \> &\_\_rhs)\
 class **shared\_ptr**\
 class **weak\_ptr**\

## Author

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