Skip to content

Commit 818360d

Browse files
committed
Drop support for clang 19 with libc++ so that we can support constexp parse function
1 parent 6da1f4a commit 818360d

2 files changed

Lines changed: 5 additions & 50 deletions

File tree

.github/workflows/skyr-url-ci.yml

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,6 @@ jobs:
4747
cxx_standard: 23
4848
}
4949

50-
# Clang-18 (C++23)
51-
- {
52-
name: "Linux Clang 18 Debug (C++23)", artifact: "Linux.tar.xz",
53-
os: ubuntu-24.04,
54-
build_type: Debug,
55-
cc: "clang-18", cxx: "clang++-18",
56-
cxx_standard: 23
57-
}
58-
- {
59-
name: "Linux Clang 18 Release (C++23)", artifact: "Linux.tar.xz",
60-
os: ubuntu-24.04,
61-
build_type: RelWithDebInfo,
62-
cc: "clang-18", cxx: "clang++-18",
63-
cxx_standard: 23
64-
}
65-
6650
# Clang-19 (C++23)
6751
- {
6852
name: "Linux Clang 19 Debug (C++23)", artifact: "Linux.tar.xz",
@@ -111,22 +95,6 @@ jobs:
11195
cxx_standard: 23
11296
}
11397

114-
# macOS Clang-18 (C++23)
115-
- {
116-
name: "macOS Clang 18 Debug (C++23)", artifact: "macOS.tar.xz",
117-
os: macos-latest,
118-
build_type: Debug,
119-
cc: "clang-18", cxx: "clang++-18",
120-
cxx_standard: 23
121-
}
122-
- {
123-
name: "macOS Clang 18 Release (C++23)", artifact: "macOS.tar.xz",
124-
os: macos-latest,
125-
build_type: RelWithDebInfo,
126-
cc: "clang-18", cxx: "clang++-18",
127-
cxx_standard: 23
128-
}
129-
13098
# macOS Clang-19 (C++23)
13199
- {
132100
name: "macOS Clang 19 Debug (C++23)", artifact: "macOS.tar.xz",
@@ -255,7 +223,7 @@ jobs:
255223
COMMAND chmod +x ${cmake_dir}/cmake
256224
)
257225
258-
# GCC 13-14 and Clang 18 are pre-installed on ubuntu-24.04
226+
# GCC 13-14 are pre-installed on ubuntu-24.04
259227
# Clang 19-21 need to be installed from LLVM repository
260228

261229
- name: Install Clang and libc++ (C++23 support)
@@ -266,11 +234,9 @@ jobs:
266234
# Extract version number from compiler name (e.g., clang++-19 -> 19)
267235
CLANG_VERSION=$(echo "${{ matrix.config.cxx }}" | grep -oP '\d+')
268236
269-
# Add LLVM repository for newer versions
270-
if [[ "$CLANG_VERSION" != "18" ]]; then
271-
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
272-
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${CLANG_VERSION} main"
273-
fi
237+
# Add LLVM repository
238+
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
239+
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${CLANG_VERSION} main"
274240
275241
sudo apt-get update
276242

include/skyr/url_format.hpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,6 @@
4242
/// std::println("{:qd}", url); // ?name=John Doe (decoded)
4343
/// \endcode
4444

45-
// Workaround for libc++ versions that don't fully support constexpr in formatter::parse()
46-
// Some older libc++ implementations (e.g., Homebrew Clang 18 on macOS) have issues
47-
// with constexpr evaluation in formatter specializations
48-
#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 190000
49-
# define SKYR_FORMAT_PARSE_CONSTEXPR
50-
#else
51-
# define SKYR_FORMAT_PARSE_CONSTEXPR constexpr
52-
#endif
53-
5445
namespace std {
5546
template <>
5647
struct formatter<skyr::url> {
@@ -68,7 +59,7 @@ struct formatter<skyr::url> {
6859
format_type type_ = format_type::full;
6960
bool decode_ = false; // 'd' modifier for decoded output
7061

71-
SKYR_FORMAT_PARSE_CONSTEXPR auto parse(std::format_parse_context& ctx) -> std::format_parse_context::iterator {
62+
constexpr auto parse(std::format_parse_context& ctx) -> std::format_parse_context::iterator {
7263
auto it = ctx.begin();
7364
const auto end = ctx.end();
7465

@@ -190,6 +181,4 @@ struct formatter<skyr::url> {
190181
};
191182
} // namespace std
192183

193-
#undef SKYR_FORMAT_PARSE_CONSTEXPR
194-
195184
#endif // SKYR_URL_FORMAT_HPP

0 commit comments

Comments
 (0)