Simplify _Rb_tree instantiation
François Dumont
frs.dumont@gmail.com
Fri May 25 16:50:00 GMT 2018
Hi
As we are at working on associative containers I'd like to propose this
last patch to remove the copy constructible constraint on the _Compare
functor when it is supposed to be default constructed.
This way the _Compare is built directly at its final place.
   * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
   (_Rb_tree(const allocator_type&)): Use latter.
   * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
   (map(initializer_list<value_type>, const allocator_type&)): Likewise.
   (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
   * include/bits/stl_multimap.h
   (multimap(const allocator_type&)): Likewise.
   (multimap(initializer_list<value_type>, const allocator_type&)):
   Likewise.
   (multimap(_InputIterator, _InputIterator, const allocator_type&)):
   Likewise.
   * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
   (set(initializer_list<value_type>, const allocator_type&)): Likewise.
   (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
   * include/bits/stl_multiset.h
   (multiset(const allocator_type&)): Likewise.
   (multiset(initializer_list<value_type>, const allocator_type&)):
   Likewise.
   (multiset(_InputIterator, _InputIterator, const allocator_type&)):
   Likewise.
Tested under linux x86_64.
Ok to commit ?
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rb_tree.patch
Type: text/x-patch
Size: 6667 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20180525/19e70f5d/attachment.bin>
More information about the Libstdc++
mailing list