31 lines
903 B
C++
31 lines
903 B
C++
/***
|
|
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::PmrCppHeapWrapper<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; |