Skip to content

Remove space from user defined string literal #1092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hpkfft
Copy link
Contributor

@hpkfft hpkfft commented Jun 26, 2025

The Intel icpx 2025.2.0 compiler, which is based on clang, warns that identifier '_s' preceded by whitespace in a literal operator declaration is deprecated.

That seems to be correct. https://en.cppreference.com/w/cpp/language/user_literal.html documents

user-defined-string-literal the character sequence "" followed, without a space, by the character sequence that becomes the ud-suffix

Note that nanobind's definition of operator""_a in nb_attr.h does not have whitespace, so this PR is consistent.

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.

1 participant