[zeromq-dev] [PATCH] Re: c++ api issues
Martin Sustrik
sustrik at 250bpm.com
Tue Oct 26 14:37:15 CEST 2010
Burak,
> for the record, i did not want to const-correct just the c++ api with
> const_cast because const_cast's sole valid use-case is interoperability.
> so the user should choose to use it if he/she's after strict
> const-correctness.
>
> so using it inside the zeromq c++ api is simply lying to the user.
Right.
The state of the affairs can be summarised like this:
C API exposes non-const functions.
It should expose const functions instead, but that cannot be fixed till
0MQ/3.0 because of backward compatibility reasons.
C++ wraps the C functions and thus inherits the const-ness issue.
Martin
More information about the zeromq-dev
mailing list