Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HansKristian-Work/dxil-spirv.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2020-08-26 12:19:38 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2020-08-26 12:19:38 +0300
commitbb6b93ecafee219cdde058131ebd3545566e3663 (patch)
treeb3c0f289fd12ca367fddc5de754766fa1eb14077 /util
parentc0aca79655400673b67b2f270810962f85f12b9d (diff)
Override std::set as well.
Diffstat (limited to 'util')
-rw-r--r--util/thread_local_allocator.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/thread_local_allocator.hpp b/util/thread_local_allocator.hpp
index 2b33f75..9a3011f 100644
--- a/util/thread_local_allocator.hpp
+++ b/util/thread_local_allocator.hpp
@@ -21,6 +21,7 @@
#include <vector>
#include <unordered_set>
#include <unordered_map>
+#include <set>
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
@@ -71,6 +72,9 @@ using Vector = std::vector<T, ThreadLocalAllocator<T>>;
template <typename T>
using UnorderedSet = std::unordered_set<T, std::hash<T>, std::equal_to<T>, ThreadLocalAllocator<T>>;
+template <typename T>
+using Set = std::set<T, std::less<T>, ThreadLocalAllocator<T>>;
+
template <typename Key, typename Value, typename Hash = std::hash<Key>>
using UnorderedMap = std::unordered_map<Key, Value, std::hash<Key>, std::equal_to<Key>, ThreadLocalAllocator<std::pair<const Key, Value>>>;