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

'message_t' is deprecated: from 4.7.0 #647

Open
nvanwyen opened this issue Feb 11, 2025 · 2 comments
Open

'message_t' is deprecated: from 4.7.0 #647

nvanwyen opened this issue Feb 11, 2025 · 2 comments

Comments

@nvanwyen
Copy link

Is there an update available or planned which removes the depreciated message_t from the library and tests?

cppzmq/tests/message.cpp:75:20: warning: 'message_t' is deprecated: from 4.7.0, use constructors taking iterators, (pointer, size) or strings instead [-Wdeprecated-declarations]
   75 |     zmq::message_t hi_msg("Hi"); // deprecated
      |                    ^
cppzmq/zmq.hpp:469:14: note: 'message_t' has been explicitly marked deprecated here
  469 |     explicit message_t(const Char (&data)[N]) :
      |              ^
cppzmq/tests/message.cpp:193:26: warning: 'message_t' is deprecated: from 4.7.0, use constructors taking iterators, (pointer, size) or strings instead [-Wdeprecated-declarations]
  193 |     const zmq::message_t depr("Foo"); // deprecated
      |                          ^
cppzmq/zmq.hpp:469:14: note: 'message_t' has been explicitly marked deprecated here
  469 |     explicit message_t(const Char (&data)[N]) :
      |              ^
czmq/cppzmq/tests/socket.cpp:623:24: warning: 'recv' is deprecated: from 4.3.1, use recv taking a reference to message_t and recv_flags [-Wdeprecated-declarations]
  623 |     const bool res = s.recv(&rmsg);
      |                        ^
cppzmq/zmq.hpp:2010:5: note: 'recv' has been explicitly marked deprecated here
 2010 |     ZMQ_CPP11_DEPRECATED(
      |     ^
cppzmq/zmq.hpp:87:35: note: expanded from macro 'ZMQ_CPP11_DEPRECATED'
   87 | #define ZMQ_CPP11_DEPRECATED(msg) ZMQ_DEPRECATED(msg)
      |                                   ^
cppzmq/zmq.hpp:65:31: note: expanded from macro 'ZMQ_DEPRECATED'
   65 | #define ZMQ_DEPRECATED(msg) [[deprecated(msg)]]
      |                               ^
@gummif
Copy link
Member

gummif commented Feb 11, 2025

The tests still are testing the deprecated functions. We could silence particular warning where needed with pragmas.

@nvanwyen
Copy link
Author

Thank you for the response. Understood and it may be advantageous to silence these particular warnings if they are expected.

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