Skip to content
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

LLVM 16.0.6 issues warning for literal operators when Wdeprecated-literal-operator #4129

Closed
2 tasks done
burcelee opened this issue Aug 29, 2023 · 1 comment · Fixed by #4161
Closed
2 tasks done
Assignees
Labels
kind: bug solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@burcelee
Copy link

Description

This may not be a "bug", but it's a room for possible improvement. Basically as in the title. Issue appears of this commit to LLVM (https://reviews.llvm.org/rG5ce5e983f82c802e44faa8ed42d605d70c045ba9).

CPP ref also indicates the operator syntax used in json.hpp is deprecated:

https://en.cppreference.com/w/cpp/language/user_literal

Note: I already have a fix prepared in a fork, and can submit a PR. The change is entirely to whitespace.

Reproduction steps

I was able to reproduce the bug building a project with Emscripten (which has been upgraded to LLVM 16.0.6), but I imagine that's an unnessecary step.

Expected vs. actual results

Compile without warning.

Minimal code example

I have resolved the issue in my fork: https://github.com/burcelee/json. I'd be happy to open a PR, but was told to open an issue first by the contributors document.

Error messages

json.hpp:5176:35: error: identifier '_json' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
...

Compiler and operating system

LLVM 16.0.6, Ubuntu

Library version

latest

Validation

@dhentschel-truepic
Copy link

I just ran into this compile warning on my project this morning, and came here to see if had already been reported. Thank you @burcelee for being proactive and putting together a fix. I would love to see this integrated into a release ASAP.

@nlohmann nlohmann self-assigned this Sep 23, 2023
@nlohmann nlohmann added this to the Release 3.11.3 milestone Sep 23, 2023
@nlohmann nlohmann added the solution: proposed fix a fix for the issue has been proposed and waits for confirmation label Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants