Skip to content

Commit 3c4e755

Browse files
committed
Swift: fix macOS not having std::ranges::sized_range
1 parent 8b3e32f commit 3c4e755

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

swift/extractor/infra/SwiftDispatcher.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#pragma once
22

33
#include <filesystem>
4-
#include <ranges>
54

65
#include <swift/AST/SourceFile.h>
76
#include <swift/Basic/SourceManager.h>
@@ -210,7 +209,7 @@ class SwiftDispatcher {
210209
auto fetchRepeatedLabels(Iterable&& arg) {
211210
using Label = decltype(fetchLabel(*arg.begin()));
212211
TrapLabelVectorWrapper<typename Label::Tag> ret;
213-
if constexpr (std::ranges::sized_range<Iterable>) {
212+
if constexpr (requires { arg.size(); }) {
214213
ret.data.reserve(arg.size());
215214
}
216215
for (auto&& e : arg) {

0 commit comments

Comments
 (0)