Re: [PATCH][RFC] Make iterating over hash-map elide copying/destructing

2018-07-11 Thread Pedro Alves
On 07/11/2018 12:24 PM, Trevor Saunders wrote: > However if we went that route we should prevent use of the > assignment operator by declaring one explicitly and making it private but > then not implementing it, so it at least fails to link and with some > macros you can actually tell the compiler

Re: [PATCH][RFC] Make iterating over hash-map elide copying/destructing

2018-07-11 Thread Trevor Saunders
On Tue, Jul 10, 2018 at 11:46:54AM +0200, Richard Biener wrote: > On Tue, 10 Jul 2018, Trevor Saunders wrote: > > > On Tue, Jul 10, 2018 at 10:43:20AM +0200, Richard Biener wrote: > > > > > > The following makes the hash-map iterator dereference return a pair > > Value&> rather than a copy of

Re: [PATCH][RFC] Make iterating over hash-map elide copying/destructing

2018-07-10 Thread Richard Biener
On Tue, 10 Jul 2018, Richard Biener wrote: > On Tue, 10 Jul 2018, Trevor Saunders wrote: > > > On Tue, Jul 10, 2018 at 10:43:20AM +0200, Richard Biener wrote: > > > > > > The following makes the hash-map iterator dereference return a pair > > Value&> rather than a copy of Value. This matches

Re: [PATCH][RFC] Make iterating over hash-map elide copying/destructing

2018-07-10 Thread Richard Biener
On Tue, 10 Jul 2018, Trevor Saunders wrote: > On Tue, Jul 10, 2018 at 10:43:20AM +0200, Richard Biener wrote: > > > > The following makes the hash-map iterator dereference return a pair > Value&> rather than a copy of Value. This matches the hash-table iterator > > behavior and avoids issues

Re: [PATCH][RFC] Make iterating over hash-map elide copying/destructing

2018-07-10 Thread Trevor Saunders
On Tue, Jul 10, 2018 at 10:43:20AM +0200, Richard Biener wrote: > > The following makes the hash-map iterator dereference return a pair Value&> rather than a copy of Value. This matches the hash-table iterator > behavior and avoids issues with > > hash_map > Eventually somebodies probably