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-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 typename T class A { T Obj; public: T element_type; A (T *); template class X A (AX p1) { p1.Obj; } template class X 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 typename T class A { T Obj; public: T element_type; A (T *); template class X A

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

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: templateclass X friend class IntrusiveRefCntPtrX; so that

[patch] c++/58051 Implement Core 1579

2014-06-26 Thread Jonathan Wakely
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 types. Tested x86_64-linux, no regressions. OK for trunk?

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

2014-06-26 Thread Jason Merrill
OK. Jason