query/include/matador/object/object_ptr.hpp

18 lines
272 B
C++

#ifndef OBJECT_PTR_HPP
#define OBJECT_PTR_HPP
namespace matador::object {
template <typename Type>
class object_ptr {
public:
Type* operator->() { return ptr; };
Type& operator*() { return *ptr; };
private:
Type* ptr{nullptr};
};
}
#endif //OBJECT_PTR_HPP