Re: [Patch] Forward triviality in variant

2017-06-27 Thread Jonathan Wakely
On 18/06/17 12:37 -0700, Tim Shen via libstdc++ wrote: Besides the changes on the comments, I also changed the definition of _S_trivial_copy_assign and _S_trivial_move_assign to match what union has. See [class.copy.assign]p9. On Thu, Jun 1, 2017 at 8:13 AM, Jonathan Wakely wrote: On 30/05/17 0

Re: [Patch] Forward triviality in variant

2017-06-18 Thread Tim Shen via gcc-patches
Besides the changes on the comments, I also changed the definition of _S_trivial_copy_assign and _S_trivial_move_assign to match what union has. See [class.copy.assign]p9. On Thu, Jun 1, 2017 at 8:13 AM, Jonathan Wakely wrote: > On 30/05/17 02:16 -0700, Tim Shen via libstdc++ wrote: >> >> diff --g

Re: [Patch] Forward triviality in variant

2017-06-01 Thread Jonathan Wakely
On 01/06/17 19:07 +0300, Ville Voutilainen wrote: On 1 June 2017 at 19:03, Jonathan Wakely wrote: On 01/06/17 18:43 +0300, Ville Voutilainen wrote: On 1 June 2017 at 18:29, Jonathan Wakely wrote: They all seem to be shortcuts for something::value, so it seems to me logical to have them all

Re: [Patch] Forward triviality in variant

2017-06-01 Thread Ville Voutilainen
On 1 June 2017 at 19:03, Jonathan Wakely wrote: > On 01/06/17 18:43 +0300, Ville Voutilainen wrote: >> >> On 1 June 2017 at 18:29, Jonathan Wakely wrote: They all seem to be shortcuts for something::value, so it seems to me logical to have them all be _v. >>> The _v suffixes i

Re: [Patch] Forward triviality in variant

2017-06-01 Thread Jonathan Wakely
On 01/06/17 18:43 +0300, Ville Voutilainen wrote: On 1 June 2017 at 18:29, Jonathan Wakely wrote: They all seem to be shortcuts for something::value, so it seems to me logical to have them all be _v. The _v suffixes in the standard are there to distinguish std::foo from std::foo_v, but we do

Re: [Patch] Forward triviality in variant

2017-06-01 Thread Ville Voutilainen
On 1 June 2017 at 18:29, Jonathan Wakely wrote: >> They all seem to be shortcuts for something::value, so it seems to me >> logical to have >> them all be _v. > > > The _v suffixes in the standard are there to distinguish std::foo from > std::foo_v, but we don't have that problem. Wouldn't necess

Re: [Patch] Forward triviality in variant

2017-06-01 Thread Jonathan Wakely
On 01/06/17 18:21 +0300, Ville Voutilainen wrote: On 1 June 2017 at 18:13, Jonathan Wakely wrote: On 30/05/17 02:16 -0700, Tim Shen via libstdc++ wrote: diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant index b9824a5182c..f81b815af09 100644 --- a/libstdc++-v3/in

Re: [Patch] Forward triviality in variant

2017-06-01 Thread Ville Voutilainen
On 1 June 2017 at 18:13, Jonathan Wakely wrote: > On 30/05/17 02:16 -0700, Tim Shen via libstdc++ wrote: >> >> diff --git a/libstdc++-v3/include/std/variant >> b/libstdc++-v3/include/std/variant >> index b9824a5182c..f81b815af09 100644 >> --- a/libstdc++-v3/include/std/variant >> +++ b/libstdc++-v

Re: [Patch] Forward triviality in variant

2017-06-01 Thread Jonathan Wakely
On 30/05/17 02:16 -0700, Tim Shen via libstdc++ wrote: diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant index b9824a5182c..f81b815af09 100644 --- a/libstdc++-v3/include/std/variant +++ b/libstdc++-v3/include/std/variant @@ -290,6 +290,53 @@ _GLIBCXX_BEGIN_NAMESPACE

Re: [Patch] Forward triviality in variant

2017-05-30 Thread Tim Shen via gcc-patches
On Mon, May 29, 2017 at 11:29 PM, Tim Shen wrote: > This patch implements > , but with more Actually, it didn't. The copy assign and move assign conditions are wrong in the patch. Fixed those. -- Regards, Tim Shen commit 03387ef5007e171e4aeceed

[Patch] Forward triviality in variant

2017-05-29 Thread Tim Shen via gcc-patches
This patch implements , but with more changes than the proposal's. It 1) Creates __detail::__variant::_Traits as a centralized place to hold common (but not all yet) compile-time conditions. 2) Changes the noexcept conditions for the (copy|move) (ct