AuroraRuntime/Include/Aurora/Memory/MemRef.hpp

32 lines
486 B
C++
Raw Normal View History

2021-06-27 21:25:29 +00:00
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: MemRef.hpp
Date: 2021-6-11
Author: Reece
***/
#pragma once
namespace Aurora::Memory
{
template<typename T>
struct MemRef
{
MemRef(T *val)
{
Pointer = val;
}
MemRef(T &val)
{
Pointer = &val;
}
T *operator->() const
{
return Pointer;
}
T *Pointer;
};
}