Skip to content

nanodbc: include <locale> for wstring_convert (clang 23 / libc++ 23) - #1032

Merged
jeroen merged 2 commits into
mainfrom
fix-clang23-locale-include
Aug 28, 2026
Merged

jeroen merged 2 commits into
mainfrom
fix-clang23-locale-include

Conversation

@jeroen

@jeroen jeroen commented Aug 27, 2026

Copy link
Copy Markdown
Member

Fixes #1031

This is a stop-gap solution. The proper solution is to upgrade our vendored nanodbc, see #1027. However that is a much larger, potentially breaking change, that requires more careful testing.

jeroen and others added 2 commits August 27, 2026 19:28
libc++ 23 dropped transitive includes in all language modes, so
<codecvt> no longer pulls in <locale>, where std::wstring_convert is
declared. Include it explicitly. Fixes the CRAN clang23 check failure
(#1031).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The added <locale> include shifts every throw site in nanodbc.cpp
down by three lines, and the errors rethrown from the live library
embed those line numbers. Only the two live snapshots change; the
'messages from the wild' snapshots quote hard-coded strings from
test-utils.R and stay as they are.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jeroen
jeroen force-pushed the fix-clang23-locale-include branch from b84892c to c9ea650 Compare August 27, 2026 18:58

@simonpcouch simonpcouch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jeroen
jeroen merged commit 7136d22 into main Aug 28, 2026
20 checks passed
@jeroen
jeroen deleted the fix-clang23-locale-include branch August 28, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix clang23 warning on CRAN

2 participants