File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2143,11 +2143,12 @@ class raw_hash_set {
21432143 return *slot_;
21442144 }
21452145
2146+ // returns a pointer to the inserted value
21462147 template <class ... Args>
2147- void operator ()(Args&&... args) const {
2148+ slot_type* operator ()(Args&&... args) const {
21482149 assert (*slot_);
21492150 PolicyTraits::construct (alloc_, *slot_, std::forward<Args>(args)...);
2150- *slot_ = nullptr ;
2151+ return *slot_;
21512152 }
21522153
21532154 private:
@@ -2204,7 +2205,6 @@ class raw_hash_set {
22042205 void lazy_emplace_at (size_t & idx, F&& f) {
22052206 slot_type* slot = slots_ + idx;
22062207 std::forward<F>(f)(constructor (&alloc_ref (), &slot));
2207- assert (!slot);
22082208 }
22092209
22102210 template <class K = key_type, class F >
You can’t perform that action at this time.
0 commit comments