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

Deprecated space in "" operator overloads causes compiler warnings, which causes errors in our release builds #68

Closed
reFX-Mike opened this issue Oct 11, 2023 · 4 comments

Comments

@reFX-Mike
Copy link

The file q_lib/include/q/support/literals.hpp contains 18 operator overloads for e.g.

constexpr frequency operator "" _Hz(long double val)

The space between " and _Hztriggers a compiler warning, which in our case leads to a compiler error, since we compile with warnings are errors, to force ourselves to produce clean(er) code.

All operator overloads in that file have that problem. Removing the space fixes it and has no side effects.

@djowel
Copy link
Member

djowel commented Oct 11, 2023

What is the warning and which compiler? Can you file a PR so a commit can be tracked to this and you? Thanks!

@reFX-Mike
Copy link
Author

Warning is -Wdeprecated-literal-operator

The compiler is llvm/clang 17.0.2

I don't want to create a fork for a single file with only 18 trivial changes. If you remove the space, the warning goes away and compiles cleanly on all compilers. The space in between has been deprecated.

@djowel
Copy link
Member

djowel commented Oct 11, 2023

OK, no problem. Thanks for the report!

@djowel
Copy link
Member

djowel commented Oct 11, 2023

Fixed in develop branch. I'll merge to master ASAP.

@djowel djowel closed this as completed Oct 11, 2023
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

No branches or pull requests

2 participants