Skip to content

Commit 18e1eb5

Browse files
<flat_map> <flat_set>: Add _NODISCARD, remove nested _Clear_guard, add precondition checks etc. (#5953)
* Add _NODISCARD to flat_map and flat_set. * Don't query the nothrow_move_constructibility of flat_map::key_compare when it is only copied. * flat_map::_Extract_using_allocator should be rvalue-ref qualified. * Make flat_map::extract consistent with flat_set::extract. * flat_set::_Erase should not pessimize performance for different _Ty and _Kty. * Some libcxx tests have to be FAILed due to throwing move constructor of comparator. * Remove nested _Clear_guards form flat_map * Make newlines between functions in <flat_set> consistent (remove between short repetitive functions) * Add precondition checks to flat_map * consistently use typedef key_compare instead of template parameter _Compare in flat_map code. * Fix formatting. * _Flat_map_base::_Is_sorted should not be template. * Wrap _Flat_map_base::_Key_compare with _Pass_fn when calling standard algorithms (e.g. lower_bound) * Correct formatting. * Introduce a helper function to call _Pass_fn in flat_map. * Start to unify implementation of deduplication between flat_map and flat_set. * Make begin/end available when including <flat_map> * Reference correct standard WP in comments. * Correct formatting. * Use ranges::sort instead of std::sort. * Mention that FAILed libcxx tests are due to different resolution of LWG-2227 * Fix/update citations. * Consistently use the `_Always_clear` name. * All shall love `adjacent_find()` and despair. * Categorize LWG-2227 divergence as "likely bogus tests", not "missing STL features". --------- Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
1 parent e845cc9 commit 18e1eb5

File tree

3 files changed

+142
-98
lines changed

3 files changed

+142
-98
lines changed

0 commit comments

Comments
 (0)