Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/p.hpp"
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relationships and ordering operators to the pointee objects.
TAR | the visible pointee type |
BASE | the shared-ptr type used as implementation |
Public Member Functions | |
template<class Y > | |
P (Y *p) | |
template<class Y , class D > | |
P (Y *p, D d) | |
P (P const &r) | |
P (P const &&rr) | |
template<class Y > | |
P (shared_ptr< Y > const &r) | |
template<class Y > | |
P (weak_ptr< Y > const &wr) | |
template<class Y > | |
P (std::unique_ptr< Y > &&u) | |
TAR * | get () const |
operator std::string () const noexcept | |
use custom string conversion on pointee, if applicable, otherwise fall back to a human readable type string.S | |
TAR & | operator* () const |
TAR * | operator-> () const |
P & | operator= (P const &r) |
P & | operator= (P const &&rr) |
template<class Y > | |
P & | operator= (shared_ptr< Y > const &sr) |
void | swap (P &b) |
Friends | |
template<typename _O_ , typename B > | |
bool | operator!= (P const &p, P< _O_, B > const &q) |
template<typename _O_ , typename B > | |
bool | operator< (P const &p, P< _O_, B > const &q) |
template<typename _O_ , typename B > | |
bool | operator<= (P const &p, P< _O_, B > const &q) |
template<typename _O_ , typename B > | |
bool | operator== (P const &p, P< _O_, B > const &q) |
template<typename _O_ , typename B > | |
bool | operator> (P const &p, P< _O_, B > const &q) |
template<typename _O_ , typename B > | |
bool | operator>= (P const &p, P< _O_, B > const &q) |