diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2018-08-01 01:33:38 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2018-08-01 01:33:38 +0000 |
commit | b0386a515b60c2f43eaaef986bd5b1cdc4448244 (patch) | |
tree | bf43e7a1f1c135df7a7873d08381e77c70c1416e /libcxx/test/support | |
parent | 9057546c5bf2015414186c1a1f0660cd32344362 (diff) | |
download | bcm5719-llvm-b0386a515b60c2f43eaaef986bd5b1cdc4448244.tar.gz bcm5719-llvm-b0386a515b60c2f43eaaef986bd5b1cdc4448244.zip |
First half of C++17's splicing maps and sets
This commit adds a node handle type, (located in __node_handle), and adds
extract() and insert() members to all map and set types, as well as their
implementations in __tree and __hash_table.
The second half of this feature is adding merge() members, which splice nodes
in bulk from one container into another. This will be committed in a follow-up.
Differential revision: https://reviews.llvm.org/D46845
llvm-svn: 338472
Diffstat (limited to 'libcxx/test/support')
-rw-r--r-- | libcxx/test/support/Counter.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/test/support/Counter.h b/libcxx/test/support/Counter.h index 4a658c58c06..63ed6080155 100644 --- a/libcxx/test/support/Counter.h +++ b/libcxx/test/support/Counter.h @@ -23,7 +23,7 @@ public: Counter() : data_() { ++gConstructed; } Counter(const T &data) : data_(data) { ++gConstructed; } Counter(const Counter& rhs) : data_(rhs.data_) { ++gConstructed; } - Counter& operator=(const Counter& rhs) { ++gConstructed; data_ = rhs.data_; return *this; } + Counter& operator=(const Counter& rhs) { data_ = rhs.data_; return *this; } #if TEST_STD_VER >= 11 Counter(Counter&& rhs) : data_(std::move(rhs.data_)) { ++gConstructed; } Counter& operator=(Counter&& rhs) { ++gConstructed; data_ = std::move(rhs.data_); return *this; } @@ -49,7 +49,7 @@ struct hash<Counter<T> > typedef Counter<T> argument_type; typedef std::size_t result_type; - std::size_t operator()(const Counter<T>& x) const {return std::hash<T>(x.get());} + std::size_t operator()(const Counter<T>& x) const {return std::hash<T>()(x.get());} }; } |