dune-common
2.3.1
|
implements the Deleter concept of shared_ptr without deleting anything More...
#include <dune/common/shared_ptr.hh>
Public Member Functions | |
void | operator() (T *) const |
implements the Deleter concept of shared_ptr without deleting anything
If you allocate an object on the stack, but want to pass it to a class or function as a shared_ptr, you can use this deleter to avoid accidental deletion of the stack-allocated object.
For convenience we provide two free functions to create a shared_ptr from a stack-allocated object (
1) Convert a stack-allocated object to a shared_ptr:
2) Convert a stack-allocated object to a shared_ptr of a base class
T | type of the stack-allocated object |
|
inline |