From 0bf4ad9e4a9e1c97e92aa23a365405dfef89bd7c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 17 Jan 2021 19:36:30 +0000 Subject: Big reshuffle Fixes code quality warnings now picked up. --- ptr.hpp | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 ptr.hpp (limited to 'ptr.hpp') diff --git a/ptr.hpp b/ptr.hpp deleted file mode 100644 index b92b63e..0000000 --- a/ptr.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef PTR_H -#define PTR_H - -#include - -template class wrapped_ptr : public std::unique_ptr { -public: - using std::unique_ptr::unique_ptr; - wrapped_ptr() : std::unique_ptr {{}, {}} { } - - inline - operator Obj *() const - { - return this->get(); - } - - template - static auto - create(Obj * (*factory)(Args...), void (*deleter)(Obj *), Params &&... params) - { - return wrapped_ptr {factory(std::forward(params)...), deleter}; - } -}; - -#endif -- cgit v1.2.3