Skip to content

Fix deprecated literal operator#651

Open
cielavenir wants to merge 1 commit intozeromq:masterfrom
cielavenir:fixLiteralOperator
Open

Fix deprecated literal operator#651
cielavenir wants to merge 1 commit intozeromq:masterfrom
cielavenir:fixLiteralOperator

Conversation

@cielavenir
Copy link

On clang 20, this happens:

$ clang++-20 zmq.hpp
zmq.hpp:1367:35: warning: identifier '_zbuf' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
 1367 | constexpr const_buffer operator"" _zbuf(const char *str, size_t len) noexcept
      |                        ~~~~~~~~~~~^~~~~
      |                        operator""_zbuf
zmq.hpp:1371:35: warning: identifier '_zbuf' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
 1371 | constexpr const_buffer operator"" _zbuf(const wchar_t *str, size_t len) noexcept
      |                        ~~~~~~~~~~~^~~~~
      |                        operator""_zbuf
zmq.hpp:1375:35: warning: identifier '_zbuf' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
 1375 | constexpr const_buffer operator"" _zbuf(const char16_t *str, size_t len) noexcept
      |                        ~~~~~~~~~~~^~~~~
      |                        operator""_zbuf
zmq.hpp:1379:35: warning: identifier '_zbuf' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
 1379 | constexpr const_buffer operator"" _zbuf(const char32_t *str, size_t len) noexcept
      |                        ~~~~~~~~~~~^~~~~
      |                        operator""_zbuf
4 warnings generated.

@mschubert
Copy link
Contributor

It looks like this was already merged: #652

@cielavenir
Copy link
Author

@mschubert may I ask which is better, operator ""_zbuf or operator""_zbuf?

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.

2 participants