zeromq / zmqpp

0mq 'highlevel' C++ bindings
http://zeromq.github.io/zmqpp
Mozilla Public License 2.0
439 stars 195 forks source link

socket send and receive deprecated warnings #230

Open williamleong opened 4 years ago

williamleong commented 4 years ago

What is the reason for the comment "Unable to use message wrapper as this could be multipart legacy fallback" in socket.cpp? If this is required to support legacy code, then perhaps the deprecation warning should be removed.

zmqpp/src/zmqpp/socket.cpp:122:9: warning: 'send' is deprecated: "prefer using zmqpp::message for multipart messages" [-Wdeprecated-declarations]
        return send(str, (dont_block) ? socket::dont_wait : socket::normal);
               ^
zmqpp/src/zmqpp/socket.hpp:291:2: note: 'send' has been explicitly marked deprecated here
        ZMQPP_DEPRECATED("prefer using zmqpp::message for multipart messages")
        ^
zmqpp/src/zmqpp/compatibility.hpp:112:36: note: expanded from macro 'ZMQPP_DEPRECATED'
#define ZMQPP_DEPRECATED(reason) [[deprecated(#reason)]]
                                   ^
zmqpp/src/zmqpp/socket.cpp:128:9: warning: 'receive' is deprecated: "prefer using zmqpp::message for multipart messages" [-Wdeprecated-declarations]
        return receive(str, (dont_block) ? socket::dont_wait : socket::normal);
               ^
zmqpp/src/zmqpp/socket.hpp:306:2: note: 'receive' has been explicitly marked deprecated here
        ZMQPP_DEPRECATED("prefer using zmqpp::message for multipart messages")
        ^
zmqpp/src/zmqpp/compatibility.hpp:112:36: note: expanded from macro 'ZMQPP_DEPRECATED'
#define ZMQPP_DEPRECATED(reason) [[deprecated(#reason)]]
alvinxieqiaochu commented 3 years ago

hello, i met the same problem, have you fix that?