[+] TartanLlama/optional based optionals because i cant be arsed to finish the minimalistic std replacements

This commit is contained in:
Reece Wilson 2024-01-21 00:51:08 +00:00
parent 6d7d14a3e2
commit 6239971ea7
4 changed files with 3199 additions and 3 deletions

View File

@ -0,0 +1 @@
All software here must be CC0, Unlicense, or similar public domain license.

File diff suppressed because it is too large Load Diff

View File

@ -7,8 +7,21 @@
***/
#pragma once
#if !defined(AURORA_RUNTIME_AU_OPTIONAL)
#define AURORA_RUNTIME_AU_OPTIONAL std::optional
#if defined(DO_NOT_USEtartanllama)
#if !defined(AURORA_RUNTIME_AU_OPTIONAL)
#define AURORA_RUNTIME_AU_OPTIONAL std::optional
#endif
#else
#include "ThirdParty/tartanllamaOptional.hpp"
#if !defined(AURORA_RUNTIME_AU_OPTIONAL)
#define AURORA_RUNTIME_AU_OPTIONAL tl::optional
#endif
#endif
#if defined(_AURORA_AVOID_DUMB_STL_TYPES)

View File

@ -10,6 +10,11 @@
#include "auCopyMoveUtils.hpp"
#include "auHashUtils.hpp"
#if defined(DO_NOT_USEtartanllama)
// @DEPRECATED
// WONT FINISH, probably
// Use forked tartanllama optional instead (aurora should compile with either)
template <class T>
struct AuOptionalEx
{
@ -88,4 +93,15 @@ struct AuOptionalEx
AuSwap(this->type, ex.type);
AuSwap(this->hasValue, ex.hasValue);
}
};
// TODO finish me
};
#else
#include "ThirdParty/tartanllamaOptional.hpp"
template <typename T>
using AuOptionalEx = tl::optional<T>;
#endif