From bf6e381ff286d23531dbaf4f7a83fd4ca5ca9147 Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Mon, 3 Oct 2022 14:45:42 -0700 Subject: [PATCH] Add expliicit destructors, copy assignment operators --- include/boost/unordered/unordered_flat_map.hpp | 10 ++++++++++ include/boost/unordered/unordered_flat_set.hpp | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/include/boost/unordered/unordered_flat_map.hpp b/include/boost/unordered/unordered_flat_map.hpp index b7106e24..64df3a33 100644 --- a/include/boost/unordered/unordered_flat_map.hpp +++ b/include/boost/unordered/unordered_flat_map.hpp @@ -97,6 +97,16 @@ namespace boost { { } + ~unordered_flat_map() = default; + + unordered_flat_map& operator=(unordered_flat_map const& other) + { + if (this != &other) { + table_ = other.table_; + } + return *this; + } + allocator_type get_allocator() const noexcept { return table_.get_allocator(); diff --git a/include/boost/unordered/unordered_flat_set.hpp b/include/boost/unordered/unordered_flat_set.hpp index 3a1f5178..96aaf699 100644 --- a/include/boost/unordered/unordered_flat_set.hpp +++ b/include/boost/unordered/unordered_flat_set.hpp @@ -96,6 +96,16 @@ namespace boost { { } + ~unordered_flat_set() = default; + + unordered_flat_set& operator=(unordered_flat_set const& other) + { + if (this != &other) { + table_ = other.table_; + } + return *this; + } + allocator_type get_allocator() const noexcept { return table_.get_allocator();