[*] Improve MemoryView

This commit is contained in:
Reece Wilson 2021-09-29 09:02:01 +01:00
parent 8a6abcfdb7
commit 097f805209

View File

@ -14,6 +14,9 @@ namespace Aurora::Memory
{
using Void_t = std::conditional_t<Readonly_b, const void *, void *>;
template<typename T, int Z>
using StdArray_t = std::conditional_t<Readonly_b, const std::array<T, Z>, std::array<T, Z>>;
/*
YadaYada(MemoryView(tempstring/array/etc)) should be legal, right?
@ -116,7 +119,8 @@ namespace Aurora::Memory
template<bool Readonly_b>
struct MemoryViewStream : MemoryView<Readonly_b>
{
template<typename T, typename std::enable_if<AuIsBaseOfTemplate<AURORA_RUNTIME_AU_LIST, T>::value>::type* = nullptr>
// template<typename T, typename std::enable_if<AuIsBaseOfTemplate<AURORA_RUNTIME_AU_LIST, T>::value>::type* = nullptr>
template<typename T, AU_TEMPLATE_ENABLE_WHEN(AuIsBaseOfTemplate<AURORA_RUNTIME_AU_LIST, T>::value)>
constexpr MemoryViewStream(T &list, AuUInt &length) : MemoryView<Readonly_b>(list), outVariable(length)
{
outVariable = 0;