
- create the headers (but not include them from `<algorithm>`); - define the niebloid and its member functions with the right signatures (as no-ops); - make sure all the right headers are included that are required by each algorithm's signature; - update `CMakeLists.txt` and the module map; - create the test files with the appropriate synopses. The synopsis in `<algorithm>` is deliberately not updated because that could be taken as a readiness signal. The new headers aren't included from `<algorithm>` for the same reason. Differential Revision: https://reviews.llvm.org/D129549
49 lines
1.5 KiB
C++
49 lines
1.5 KiB
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
|
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
|
|
|
// <algorithm>
|
|
|
|
// template<permutable I, sentinel_for<I> S, class Proj = identity,
|
|
// indirect_equivalence_relation<projected<I, Proj>> C = ranges::equal_to>
|
|
// constexpr subrange<I> unique(I first, S last, C comp = {}, Proj proj = {}); // Since C++20
|
|
//
|
|
// template<forward_range R, class Proj = identity,
|
|
// indirect_equivalence_relation<projected<iterator_t<R>, Proj>> C = ranges::equal_to>
|
|
// requires permutable<iterator_t<R>>
|
|
// constexpr borrowed_subrange_t<R>
|
|
// unique(R&& r, C comp = {}, Proj proj = {}); // Since C++20
|
|
|
|
#include <algorithm>
|
|
#include <array>
|
|
#include <concepts>
|
|
#include <functional>
|
|
#include <ranges>
|
|
|
|
#include "almost_satisfies_types.h"
|
|
#include "test_iterators.h"
|
|
|
|
// TODO: SFINAE tests.
|
|
|
|
constexpr bool test() {
|
|
// TODO: main tests.
|
|
// TODO: A custom comparator works.
|
|
// TODO: A custom projection works.
|
|
|
|
return true;
|
|
}
|
|
|
|
int main(int, char**) {
|
|
test();
|
|
static_assert(test());
|
|
|
|
return 0;
|
|
}
|