Re: [patch] c++/58051 Implement Core 1579

2014-07-01 Thread Marc Glisse
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 friend class IntrusiveRefCntPtr; so that conversion fro

Re: [patch] c++/58051 Implement Core 1579

2014-07-01 Thread Jonathan Wakely
On 01/07/14 15:06 +0200, Markus Trippelsdorf wrote: On 2014.06.26 at 14:06 +0100, Jonathan Wakely wrote: DR1579 relaxes [class.copy]/32 so that expressions in return statements can be looked up as rvalues even when they aren't the same type as the function return type. Implementing that seems a

Re: [patch] c++/58051 Implement Core 1579

2014-07-01 Thread Jonathan Wakely
On 01/07/14 16:10 +0200, Marc Glisse wrote: On Tue, 1 Jul 2014, Markus Trippelsdorf wrote: This patch cause yet another LLVM build error: [...] Reduced: markus@x4 llvm_build % cat CompilerInvocation.ii template class A { T Obj; public: T element_type; A (T *); template A (A &&p1) { p1.Obj

Re: [patch] c++/58051 Implement Core 1579

2014-07-01 Thread Marc Glisse
On Tue, 1 Jul 2014, Markus Trippelsdorf wrote: This patch cause yet another LLVM build error: [...] Reduced: markus@x4 llvm_build % cat CompilerInvocation.ii template class A { T Obj; public: T element_type; A (T *); template A (A &&p1) { p1.Obj; } template A (A &); }; class B { pub

Re: [patch] c++/58051 Implement Core 1579

2014-07-01 Thread Markus Trippelsdorf
On 2014.06.26 at 14:06 +0100, Jonathan Wakely wrote: > DR1579 relaxes [class.copy]/32 so that expressions in return > statements can be looked up as rvalues even when they aren't the same > type as the function return type. > > Implementing that seems as simple as removing the restriction on the >

Re: [patch] c++/58051 Implement Core 1579

2014-06-26 Thread Jason Merrill
OK. Jason