AuROXTL/Include/auROXTL/auBST.hpp

31 lines
900 B
C++
Raw Normal View History

2022-04-01 04:06:53 +00:00
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: auBST.hpp
Date: 2022-2-1
Author: Reece
***/
#pragma once
#if !defined(AURORA_RUNTIME_AU_BST)
#define AURORA_RUNTIME_AU_BST std::map
#endif
#include "auHashUtils.hpp"
template <class T, typename Z, typename LessThan_t = AuHash::less<T>, class Allocator_t = Aurora::Memory::ClassArrayAllocator<AuPair<const T, Z>>>
using AuBST = AURORA_RUNTIME_AU_BST<T, Z, LessThan_t, Allocator_t>;
template <class T, typename Z, typename LessThan_t = AuHash::less<T>>
using AuBSTOfHeap = AuBST<T, Z, LessThan_t, Aurora::Memory::CppHeapWrapper<AuPair<const T, Z>>>;
template<typename T>
struct AuIsBST : AuFalseType
{ };
template<typename T, typename Z, typename A, typename B>
struct AuIsBST<AuBST<T, Z, A, B>> : AuTrueType
{ };
template <class T>
inline constexpr bool AuIsBST_v = AuIsBST<T>::type::value;