nanodbc: include <locale> for wstring_convert (clang 23 / libc++ 23) - #1032
Merged
Merged
Conversation
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
force-pushed
the
fix-clang23-locale-include
branch
from
August 27, 2026 18:58
b84892c to
c9ea650
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.