I hereby claim:
- I am kirillkovalenko on github.
- I am kovalenko (https://keybase.io/kovalenko) on keybase.
- I have a public key ASBmMT6M_fp1VRmATFClHNEWoaTDEGbMJWxZqtDNBl1iaAo
To claim this, I am signing this object:
//----------------------------------------------------------------------------- | |
// This header file was assembled from MSDN content. | |
// | |
// Jeff Fitzsimons, 9/2008. | |
//----------------------------------------------------------------------------- | |
#include <windows.h> | |
#include <wincrypt.h> | |
//----------------------------------------------------------------------------- |
// http://stackoverflow.com/questions/31651925/using-unique-ptr-shared-ptr-with-api-functions-returning-resources-as-out-para | |
template<typename P, typename T = typename P::element_type> | |
class outptr | |
{ | |
T* _p; P& _sp; | |
public: | |
outptr(P& sp) throw() : _p(nullptr), _sp(sp) { } | |
~outptr() throw() { _sp.reset(_p); } | |
T** operator&() throw() { return &_p; } |
I hereby claim:
To claim this, I am signing this object: