Skip to content

Commit 38f5ab2

Browse files
committed
On second thought, just remove the one use of ranges::
There's only one use of `ranges::` in the codebase, and I want cppfront to compile on reasonably recent compilers. Since Apple Clang 14 only started supporting ranges in March 2023, and that seems to be the only thing stopping use of Clang 12+ even on Xcode (AFAIK), it seems more reasonable to do this and not break Xcode Clang 12+ builds of cppfront.
1 parent 70d263d commit 38f5ab2

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/build-cppfront.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
cxx-std: 'c++2b'
2727
- compiler: clang++-14
2828
cxx-std: 'c++2b'
29-
# include:
30-
# - runs-on: macos-latest
31-
# compiler: clang++
32-
# cxx-std: 'c++20'
29+
include:
30+
- runs-on: macos-latest
31+
compiler: clang++
32+
cxx-std: 'c++20'
3333
runs-on: ${{ matrix.runs-on }}
3434
env:
3535
CXX: ${{ matrix.compiler }}

regression-tests/test-results/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
cppfront compiler v0.3.0 Build 8C13:1859
2+
cppfront compiler v0.3.0 Build 8C14:0739
33
Copyright(c) Herb Sutter All rights reserved
44

55
SPDX-License-Identifier: CC-BY-NC-ND-4.0

source/parse.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3591,8 +3591,9 @@ auto function_type_node::has_postconditions() const
35913591
-> bool
35923592
{
35933593
return
3594-
std::ranges::find_if(
3595-
contracts,
3594+
std::find_if(
3595+
contracts.begin(),
3596+
contracts.end(),
35963597
[](auto const& e){ return *e->kind == "post"; }
35973598
) != contracts.end();
35983599
}

0 commit comments

Comments
 (0)