[zeromq-dev] Request for a slight change of zmq_msg_t typedef

Chernyshev Vyacheslav astellar at ro.ru
Thu Sep 20 22:17:53 CEST 2012


Currently zmq_msg_t is a typedef of anonymous struct. It creates very 
annoying difficulties when application's API just needs a forward 
declaration, as there is no way to forward declare something that does 
not have a name. So either zmq.h has to be included, or some ugly 
reinterpret casts of a user-defined type with the same field as 
zmq_msg_t have to be used. Can it be changed to something like:

     typedef struct zmq_msg_t {unsigned char _ [32];} zmq_msg_t;

It will really make some use-cases easier and I do not see any drawbacks 
of such solution.

Thanks in advance.

More information about the zeromq-dev mailing list