
On Mon, Dec 10, 2012 at 5:23 PM, Peter Dimov <lists@pdimov.com> wrote:
Olaf van der Spek wrote:
On Mon, Dec 10, 2012 at 4:27 PM, Peter Dimov <lists@pdimov.com> wrote:
Olaf van der Spek wrote:
What's the rationale for this breaking change?
Compatibility with C++11?
The 'old' boost::shared_ptr seemed to work fine on C++11.
Sure. It seems that you're being deliberately obtuse for rhetorical reasons, but all right.
In C++11, the idiomatic way to make a class convertible to bool is via an explicit operator bool. The language has been specifically changed to support this use case. The standard library has been changed to use this idiom for each of its convertible to bool types, including std::shared_ptr. For better or worse, this will be how convertible to bool C++11 types will behave.
I know. And boost::shared_ptr behaving the same as std::shared_ptr is nice, I'm just wondering whether that's more important than maintaining compatibility with older Boost releases. What real problem with keeping the old behavor have? BTW, I'm really just wondering. -- Olaf