libstdc++: Add container adaptor constructors taking iterators (P1425R4)
authorJonathan Wakely <jwakely@redhat.com>
Thu, 13 May 2021 15:16:26 +0000 (16:16 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 1 Oct 2021 19:36:55 +0000 (20:36 +0100)
commitb7e8fb5e48279ffa5f424e3dd0bb3dfcbe69f5d5
tree0f0453d96969b192623248f0bd9ab17d70658710
parent6ccffeb56b92041991aba923545532087e1977f5
libstdc++: Add container adaptor constructors taking iterators (P1425R4)

This adds a feature that was recently added to the C++23 working draft.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/bits/stl_queue.h
(__cpp_lib_adaptor_iterator_pair_constructor): Define for C++23, as
per P1425R4.
(queue(InputIterator, InputIterator)): Likewise.
(queue(InputIterator, InputIterator, const Alloc&)): Likewise.
* include/bits/stl_stack.h
(__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
(stack(InputIterator, InputIterator)): Likewise.
(stack(InputIterator, InputIterator, const Alloc&)): Likewise.
* include/std/version (__cpp_lib_adaptor_iterator_pair_constructor):
Define.
* testsuite/23_containers/queue/cons_from_iters.cc: New test.
* testsuite/23_containers/stack/cons_from_iters.cc: New test.
libstdc++-v3/include/bits/stl_queue.h
libstdc++-v3/include/bits/stl_stack.h
libstdc++-v3/include/std/version
libstdc++-v3/testsuite/23_containers/queue/cons_from_iters.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/stack/cons_from_iters.cc [new file with mode: 0644]