Changeset View
Changeset View
Standalone View
Standalone View
test/std/algorithms/alg.modifying.operations/swap_ranges.pass.cpp
- This file was moved from test/test_swap_ranges.cpp.
// -*- C++ -*- | // -*- C++ -*- | ||||
//===-- test_swap_ranges.cpp ----------------------------------------------===// | //===-- swap_ranges.pass.cpp ----------------------------------------------===// | ||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
#include "pstl_test_config.h" | #include "support/pstl_test_config.h" | ||||
#include <iterator> | #include <iterator> | ||||
#ifdef PSTL_STANDALONE_TESTS | |||||
#include "pstl/execution" | #include "pstl/execution" | ||||
#include "pstl/algorithm" | #include "pstl/algorithm" | ||||
#include "utils.h" | #else | ||||
#include <execution> | |||||
#include <algorithm> | |||||
#endif // PSTL_STANDALONE_TESTS | |||||
#include "support/parallel_utils.h" | |||||
using namespace TestUtils; | using namespace Parallel_TestUtils; | ||||
template <typename T> | template <typename T> | ||||
struct wrapper | struct wrapper | ||||
{ | { | ||||
T t; | T t; | ||||
std::size_t number_of_swaps = 0; | std::size_t number_of_swaps = 0; | ||||
wrapper() {} | wrapper() {} | ||||
explicit wrapper(T t_) : t(t_) {} | explicit wrapper(T t_) : t(t_) {} | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |