Closed xaqq closed 8 years ago
I would welcome this. +1
We could have both for now, deprecating the old one, then remove it next major version jump? We should probably get better at tagging stable releases anyway :)
Turns out you can't have both an int and bool version as they'd both have defaults so the over load is ambiguous. Ideally I'd opt for the flag version not to have the default but that would again be breaking.
Isn't the compiler able to deduce the need to convert int to bool and vice versa? Only warnings should be given from the compiler.
Not if they both have default values for the int / bool section :/ I'm tempted to make the int version not have a default on the basis that anyone using the default can safely use the default for the bool version too. I'm not sure if that counts as a breaking change though.
Hi,
As pointed out in #56 the parameters of the
send
andreceive
overloads inzmqpp::socket
are not very consistent.Sometimes we use an
int flag
and in other places we usebool dont_block
for options. Thezmqpp::message
andzmqpp::signal
overloads usebool
because the only meaningful flag would be block or don't block.send_more
is not relevant here (please correct me if i'm wrong).However,
send_more
is relevant in thesend_raw
/receive_raw
method, so aint flag
is needed.The
std::string
overload, which is more of a syntactic sugar, usesint flag
. I guess it can be used to send multiple string as 1 message withsend_more
, but wouldn't using azmqpp::message
be a better alternative?Changing the
std::string
overload so that it takesbool dont_block
would break compatibility for people using this overload as describe before, but would bring a bit more consistency to the API.What do you think?