On Tue, 1 Jul 2014, Jonathan Wakely wrote:

Right, it looks as though that constructor has never been compiled or
tested before, so GCC is not only making the code faster but also
finding a bug :-)

The most obvious fix is to add:

template<class X> friend class IntrusiveRefCntPtr<X>;

so that conversion from rvalues of different types is supported.

No <X> in the friend declaration though.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12429

--
Marc Glisse

Reply via email to