| 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 |
| 10 | |
| 11 | // template<container-compatible-range<T> R> |
| 12 | // void push_range(R&& rg); // C++23 |
| 13 | |
| 14 | #include <queue> |
| 15 | |
| 16 | #include "../../push_range_container_adaptors.h" |
| 17 | #include "test_macros.h" |
| 18 | |
| 19 | int main(int, char**) { |
| 20 | for_all_iterators_and_allocators<int, const int*>([]<class Iter, class Sent, class Alloc>() { |
| 21 | test_push_range<std::priority_queue<int, std::vector<int, Alloc>>, Iter, Sent>(/*is_result_heapified=*/true); |
| 22 | }); |
| 23 | test_push_range_move_only<std::priority_queue>(); |
| 24 | test_push_range_inserter_choice<std::priority_queue, int>(/*is_result_heapified=*/true); |
| 25 | |
| 26 | static_assert(test_constraints_push_range<std::priority_queue, int, double>()); |
| 27 | |
| 28 | test_push_range_exception_safety_throwing_copy<std::priority_queue>(); |
| 29 | test_push_range_exception_safety_throwing_allocator<std::priority_queue, std::vector, int>(); |
| 30 | |
| 31 | return 0; |
| 32 | } |
| 33 | |