More ray tracing changes
This commit is contained in:
@@ -34,6 +34,7 @@ struct Map : public Tree<K, Pair<K, V>, _KeyFun<K, Pair<K, V>>, Compare, Allocat
|
||||
constexpr explicit Map(const Compare& comp, const Allocator& alloc = Allocator()) noexcept(noexcept(Allocator()))
|
||||
: Super(comp, alloc) {}
|
||||
constexpr explicit Map(const Allocator& alloc) noexcept(noexcept(Compare())) : Super(alloc) {}
|
||||
constexpr Map(std::initializer_list<Pair<K, V>> init) : Super(init) {}
|
||||
constexpr mapped_type& operator[](const key_type& key) {
|
||||
auto [it, inserted] = Super::insert(Pair<K, V>(key, V()));
|
||||
return it->value;
|
||||
|
||||
@@ -110,6 +110,12 @@ template <typename KeyType, typename NodeData, typename KeyFun, typename Compare
|
||||
: alloc(alloc), root(nullptr), beginIt(nullptr), endIt(nullptr), iteratorsDirty(true), _size(0), comp(comp) {}
|
||||
constexpr explicit Tree(const Allocator& alloc) noexcept(noexcept(Compare()))
|
||||
: alloc(alloc), root(nullptr), beginIt(nullptr), endIt(nullptr), iteratorsDirty(true), _size(0), comp(Compare()) {}
|
||||
constexpr Tree(std::initializer_list<NodeData> init)
|
||||
: alloc(NodeAlloc()), root(nullptr), beginIt(nullptr), endIt(nullptr), iteratorsDirty(true), _size(0), comp(Compare()) {
|
||||
for (const auto& it : init) {
|
||||
insert(it);
|
||||
}
|
||||
}
|
||||
constexpr Tree(const Tree& other) : alloc(other.alloc), root(nullptr), iteratorsDirty(true), _size(), comp(other.comp) {
|
||||
for (const auto& elem : other) {
|
||||
insert(elem);
|
||||
|
||||
Reference in New Issue
Block a user