Skip to content

Commit

Permalink
On second thought, just remove the one use of ranges::
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hsutter committed Dec 16, 2023
1 parent 70d263d commit 38f5ab2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-cppfront.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
cxx-std: 'c++2b'
- compiler: clang++-14
cxx-std: 'c++2b'
# include:
# - runs-on: macos-latest
# compiler: clang++
# cxx-std: 'c++20'
include:
- runs-on: macos-latest
compiler: clang++
cxx-std: 'c++20'
runs-on: ${{ matrix.runs-on }}
env:
CXX: ${{ matrix.compiler }}
Expand Down
2 changes: 1 addition & 1 deletion regression-tests/test-results/version
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

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

SPDX-License-Identifier: CC-BY-NC-ND-4.0
Expand Down
5 changes: 3 additions & 2 deletions source/parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -3591,8 +3591,9 @@ auto function_type_node::has_postconditions() const
-> bool
{
return
std::ranges::find_if(
contracts,
std::find_if(
contracts.begin(),
contracts.end(),
[](auto const& e){ return *e->kind == "post"; }
) != contracts.end();
}
Expand Down

0 comments on commit 38f5ab2

Please sign in to comment.