brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 4ddfe59 Raw
34 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++14, c++17, c++2010// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME11 12// template<container-compatible-range<T> R>13//   void push_range(R&& rg); // C++2314 15#include <queue>16 17#include "../../push_range_container_adaptors.h"18#include "test_macros.h"19 20int main(int, char**) {21  for_all_iterators_and_allocators<int, const int*>([]<class Iter, class Sent, class Alloc>() {22    test_push_range<std::queue<int, std::deque<int, Alloc>>, Iter, Sent>();23  });24  test_push_range_move_only<std::queue>();25  test_push_range_inserter_choice<std::queue, int>();26 27  static_assert(test_constraints_push_range<std::queue, int, double>());28 29  test_push_range_exception_safety_throwing_copy<std::queue>();30  test_push_range_exception_safety_throwing_allocator<std::queue, std::deque, int>();31 32  return 0;33}34