Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ed0af15
Implement ranges::starts_with and ranges::ends_with
miscco Jun 10, 2021
a4d81a2
Address review feedback
miscco Jun 11, 2021
08ac0ed
Accept any integral for _Equal_count
miscco Jun 11, 2021
c884756
Merge branch 'main' into P1659-ranges-starts_with
miscco Jun 12, 2021
75b4380
Add feature test macro
miscco Jun 12, 2021
39bd70d
Apply optimizations for infinite ranges
miscco Jun 22, 2021
51c859d
Merge branch 'main' into P1659-ranges-starts_with
StephanTLavavej Jun 30, 2021
3817faf
Fix failing tests
miscco Jul 1, 2021
e2ac556
Rework so that we pass unwrapped iterators around
miscco Jul 1, 2021
e0a9b89
Merge branch 'main' into P1659-ranges-starts_with
miscco Aug 4, 2021
063f583
Fix formatting
miscco Aug 4, 2021
81e49e5
Merge branch 'main' into P1659-ranges-starts_with
miscco Aug 6, 2021
1e26004
Merge branch 'main' into P1659-ranges-starts_with
miscco Aug 24, 2021
b929362
Merge branch 'main' into P1659-ranges-starts_with
StephanTLavavej Aug 31, 2021
37a18ba
Sort `tests/std/test.lst`.
StephanTLavavej Aug 31, 2021
69141f7
Merge branch 'main' into P1659-ranges-starts_with
miscco Sep 16, 2021
5849ddb
Address review comments
miscco Sep 16, 2021
624f273
Fix incorret feature test macro placement
miscco Sep 17, 2021
5f22bb6
Fix infinite ranges and prepare LWG issue
miscco Sep 17, 2021
9164868
Begone infinite ranges
miscco Oct 14, 2021
2bf6d93
Merge branch 'main' into P1659-ranges-starts_with
miscco Oct 14, 2021
8c9bf6a
We cannot handle infinite input ranges at all in starts_with, as `_Eq…
miscco Oct 14, 2021
507f85b
Reenable infinite sizes optimization
miscco Oct 15, 2021
58da2b3
optimize ends_with; fix borked tests
CaseyCarter Oct 18, 2021
cd7733d
Factor out large middle section of _Ends_with_impl
CaseyCarter Oct 18, 2021
2df4fa1
Review comments
CaseyCarter Oct 19, 2021
42c9471
[[nonodiscard]]
CaseyCarter Oct 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix failing tests
  • Loading branch information
miscco committed Jul 1, 2021
commit 3817faf8ab3e0247a653e59edc44ba242fce14fb
6 changes: 5 additions & 1 deletion tests/std/tests/P1659R3_ranges_alg_ends_with/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <cassert>
#include <concepts>
#include <ranges>
#include <span>
#include <utility>
using namespace std;

Expand Down Expand Up @@ -68,10 +69,13 @@ int main() {
#ifndef _PREFAST_ // TRANSITION, GH-1030
struct instantiator {
template <class In1, class In2>
static void call(In1&& in1 = {}, In2&& in2 = {}) {
static void call() {
using ranges::begin, ranges::end, ranges::ends_with, ranges::iterator_t, ranges::forward_range,
ranges::sized_range, ranges::sentinel_t;

In1 in1{span<const int, 0>{}};
In2 in2{span<const int, 0>{}};

if constexpr ((forward_range<In1> || sized_range<In1>) &&(forward_range<In2> || sized_range<In2>) ) {
if constexpr (!is_permissive) {
(void) ends_with(in1, in2);
Expand Down
6 changes: 5 additions & 1 deletion tests/std/tests/P1659R3_ranges_alg_starts_with/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <cassert>
#include <concepts>
#include <ranges>
#include <span>
#include <utility>
using namespace std;

Expand Down Expand Up @@ -105,9 +106,12 @@ int main() {
#ifndef _PREFAST_ // TRANSITION, GH-1030
struct instantiator {
template <class In1, class In2>
static void call(In1&& in1 = {}, In2&& in2 = {}) {
static void call() {
using ranges::begin, ranges::end, ranges::starts_with, ranges::iterator_t;

In1 in1{span<const int, 0>{}};
In2 in2{span<const int, 0>{}};

if constexpr (!is_permissive) {
(void) starts_with(in1, in2);
(void) starts_with(begin(in1), end(in1), begin(in2), end(in2));
Expand Down