#pragma once #include #include template struct AnyPtr { // cppcheck-suppress noExplicitConstructor AnyPtr(T * p) : ptr {p} { } // cppcheck-suppress noExplicitConstructor template AnyPtr(const S & p) : ptr {p.get()} { } auto get() const { return ptr; } auto operator->() const { return ptr; } auto & operator*() const { return *ptr; } private: T * ptr; }; template struct StdTypeDefs { using AnyPtr = ::AnyPtr; using AnyCPtr = ::AnyPtr; using Ptr = std::shared_ptr; using CPtr = std::shared_ptr; using WPtr = std::weak_ptr; using Collection = std::vector; using CCollection = std::vector; using WCollection = std::vector; }; template struct ConstTypeDefs { using Ptr = std::shared_ptr; using Collection = std::vector; };