Github user alanconway commented on the issue:
https://github.com/apache/qpid-proton/pull/160
> Perhaps we could have a C++11 only explicit bool conversion as well as
is_set(). However we would need to experiment a bit as some of the options
themselves are also bools so this might be confusing!
I left it off because of the confusion. I could probably be persuaded but
I'm not sure of the value - I think
if (opt.is_set()) use(opt.get())
is clearer and not really harder to use than
if (opt) use(opt.get())
> Another thing we should consider is throwing an exception if get() is
called when the option is not set.
No objection, I'll make it so. Technically it is a logic_error. Do you
think we should add proton::logic_error, or fudge it and just throw
proton::error?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]