32 lines
486 B
C++
32 lines
486 B
C++
|
/***
|
||
|
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;
|
||
|
};
|
||
|
}
|