Skip to content

Commit ad91f32

Browse files
committed
Fix Clang 21 compiler warning
1 parent af3de79 commit ad91f32

5 files changed

Lines changed: 11 additions & 2 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: httpgd
22
Type: Package
33
Title: A 'HTTP' Server Graphics Device
4-
Version: 2.1.0
4+
Version: 2.1.1
55
Authors@R:
66
c(
77
person(given = "Florian", family = "Rupprecht", email = "floruppr@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-1795-8624")),

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# httpgd 2.1.1
2+
3+
- Fix compilation failure with 'Clang 21' (vendored 'CrowCpp' CORS middleware default constructor).
4+
15
# httpgd 2.1.0
26

37
- Update vendored 'CrowCpp' library to v1.2.1.

cran-comments.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Relevant changes since archival:
1717
- Updated vendored CrowCpp library to v1.2.1 (fixes deprecated literal operator warning).
1818
- Updated AsioHeaders dependency to >= 1.28.2 (fixes macOS `allocator<void>` deprecation warnings).
1919
- Removed unused function and unused private fields that caused compiler warnings.
20+
- Fixed vendored CrowCpp CORS middleware default constructor for Clang 21 compatibility.
2021

2122
## Downstream dependencies
2223
There are no downstream dependencies.

src/lib/VENDOR.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
`operator"" _method``operator""_method`. Clang 20 warns about this
2525
(`-Wdeprecated-literal-operator`); the spaced form is deprecated in C++23.
2626

27+
5. **middlewares/cors.h:101** - Changed `CORSRules() = delete` to
28+
`CORSRules() : handler_(nullptr) {}`. Clang 21 requires `CORSHandler` to be
29+
default-constructible for `std::tuple` member initialization in `Crow()`.
30+
2731
### Patches that were needed in older versions but are now fixed upstream
2832

2933
- **json.h** `_LIBCPP_VERSION` preprocessor guard - fixed in v1.2.1.

src/lib/crow/middlewares/cors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ namespace crow
9898
CORSRules& global();
9999

100100
private:
101-
CORSRules() = delete;
101+
CORSRules() : handler_(nullptr) {}
102102
CORSRules(CORSHandler* handler):
103103
handler_(handler) {}
104104

0 commit comments

Comments
 (0)