Skip to content

Comments

common: remove spaces before literal operator#62475

Merged
tchaikov merged 1 commit intoceph:mainfrom
tchaikov:literal-operator
Mar 26, 2025
Merged

common: remove spaces before literal operator#62475
tchaikov merged 1 commit intoceph:mainfrom
tchaikov:literal-operator

Conversation

@tchaikov
Copy link
Contributor

@tchaikov tchaikov commented Mar 25, 2025

clang 20 complains when compiling a user-defined literal operator with spaces before the underscore. so let's drop the space to be compliant to
CWG2521.

/home/kefu/dev/ceph/src/common/options.h:415:41: warning: identifier '_min' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
  415 | constexpr unsigned long long operator"" _min (unsigned long long min) {
      |                              ~~~~~~~~~~~^~~~
      |                              operator""_min

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

clang 20 complains when compiling a user-defined literal operator
with spaces before the underscore. so let's drop the space to be
compliant to
[CWG2521](https://cplusplus.github.io/CWG/issues/2521.html).

```
/home/kefu/dev/ceph/src/common/options.h:415:41: warning: identifier '_min' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
  415 | constexpr unsigned long long operator"" _min (unsigned long long min) {
      |                              ~~~~~~~~~~~^~~~
      |                              operator""_min
```

Signed-off-by: Kefu Chai <[email protected]>
@batrick
Copy link
Member

batrick commented Mar 25, 2025

jenkins test api

@tchaikov tchaikov merged commit fc39d9a into ceph:main Mar 26, 2025
16 of 17 checks passed
@tchaikov tchaikov deleted the literal-operator branch March 26, 2025 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants