diff options
Diffstat (limited to 'lib/stdTypeDefs.h')
-rw-r--r-- | lib/stdTypeDefs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/stdTypeDefs.h b/lib/stdTypeDefs.h index 317cdb3..beab630 100644 --- a/lib/stdTypeDefs.h +++ b/lib/stdTypeDefs.h @@ -6,18 +6,22 @@ template<typename T> struct AnyPtr { // cppcheck-suppress noExplicitConstructor AnyPtr(T * p) : ptr {p} { } + // cppcheck-suppress noExplicitConstructor template<typename S> AnyPtr(const S & p) : ptr {p.get()} { } + auto get() const { return ptr; } + auto operator->() const { return ptr; } + auto & operator*() const { |