Closed ecorm closed 9 years ago
I think with C+11 list initialization, you could simply do this:
session->call({"foo"}, yield)
I need to test it out to make sure. If that's indeed the case, then the constructors should stay explicit
.
I tried the above a got a compiler error.
I'm going ahead and changing these constructors to implicit. This will not break the current API.
Should
Rpc
,Procedure
,Pub
,Topic
and friends have converting constructors? For instance,Rpc
has an explicit constructor taking a string for the procedure name. By making the constructor non-explicit, it would make it more convenient to call RPCs.For example, instead of
You could simply do:
However, as soon as you need to specify arguments or options, you'd have to use explicit construction: