[zeromq-dev] why do czmq methods take a char* parameter and not const char*?

Turkey Breast turkeybreast at yahoo.com
Sat Mar 8 04:49:11 CET 2014


My custom wrapper:

https://github.com/darkwallet/czmqpp

See this file:

https://github.com/darkwallet/czmqpp/blob/master/src/authenticator.cpp

I'm not even sure if what I'm doing is right. Does ZMQ modify those buffers at all? If so, why? Otherwise if they're just lacking const qualifiers, I'd rather not needlessly copy buffers. Would make sense to add them to czmq if possible.





On Saturday, March 8, 2014 2:56 AM, Turkey Breast <turkeybreast at yahoo.com> wrote:
I'm writing a c++ wrapper and this causes problems because a) string constants casting to char* is discouraged b) const char* std::string::c_str() needs a const_cast<char*> which is dodgy.

Is there any chance to make some of these methods with const char* instead?

_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev




More information about the zeromq-dev mailing list