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

ICPC: warning #1098: the qualifier on this friend declaration is ignored #3632

Closed
2 tasks done
nlohmann opened this issue Jul 30, 2022 · 2 comments · Fixed by #3634
Closed
2 tasks done

ICPC: warning #1098: the qualifier on this friend declaration is ignored #3632

nlohmann opened this issue Jul 30, 2022 · 2 comments · Fixed by #3634
Labels
kind: bug release item: 🐛 bug fix solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@nlohmann
Copy link
Owner

Description

Compiling test-alt-string_cpp11 yields a warning with ICPC.

[8/137] Building CXX object tests/CMakeFiles/test-alt-string_cpp11.dir/src/unit-alt-string.cpp.o
/__w/json/json/tests/src/unit-alt-string.cpp(164): warning #1098: the qualifier on this friend declaration is ignored
      friend bool ::operator<(const char* /*op1*/, const alt_string& /*op2*/) noexcept;
                  ^

Reproduction steps

Run CI - see https://github.com/nlohmann/json/runs/7580471440?check_suite_focus=true

Expected vs. actual results

Expected: no warning.

Actual: warning

Minimal code example

No response

Error messages

[8/137] Building CXX object tests/CMakeFiles/test-alt-string_cpp11.dir/src/unit-alt-string.cpp.o
/__w/json/json/tests/src/unit-alt-string.cpp(164): warning #1098: the qualifier on this friend declaration is ignored
      friend bool ::operator<(const char* /*op1*/, const alt_string& /*op2*/) noexcept;
                  ^

Compiler and operating system

Intel 2021.5.0.20211109, Ubuntu 20.04.3 LTS

Library version

develop

Validation

@falbrechtskirchinger
Copy link
Contributor

Removing the :: seems to fix the issue.

@nlohmann
Copy link
Owner Author

Removing the :: seems to fix the issue.

I'll create a PR.

@nlohmann nlohmann mentioned this issue Jul 30, 2022
@nlohmann nlohmann added the solution: proposed fix a fix for the issue has been proposed and waits for confirmation label Jul 30, 2022
@nlohmann nlohmann added this to the Release 3.11.0 milestone Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug release item: 🐛 bug fix 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.

2 participants