Re: Overriding iteration

2011-03-04 Thread Jonathan M Davis
On Friday, March 04, 2011 13:30:39 spir wrote: > On 03/04/2011 07:06 PM, Jonathan M Davis wrote: > > On Friday, March 04, 2011 09:13:34 spir wrote: > >> On 03/04/2011 05:43 PM, Steven Schveighoffer wrote: > >>> On Fri, 04 Mar 2011 11:29:08 -0500, Magnus Lie > >>> Hetland > > > > wrote: > Fro

Re: Overriding iteration

2011-03-04 Thread spir
On 03/04/2011 07:06 PM, Jonathan M Davis wrote: On Friday, March 04, 2011 09:13:34 spir wrote: On 03/04/2011 05:43 PM, Steven Schveighoffer wrote: On Fri, 04 Mar 2011 11:29:08 -0500, Magnus Lie Hetland wrote: From what I understand, when you override iteration, you can either implement the b

Re: Overriding iteration

2011-03-04 Thread Magnus Lie Hetland
On 2011-03-04 19:06:34 +0100, Jonathan M Davis said: On Friday, March 04, 2011 09:13:34 spir wrote: On 03/04/2011 05:43 PM, Steven Schveighoffer wrote: [snip] opApply should work but it is supposed to be slower. Defining range primitives directly on the object/container cannot work as of now,

Re: Overriding iteration

2011-03-04 Thread Magnus Lie Hetland
On 2011-03-04 17:46:39 +0100, Simen kjaeraas said: Simen kjaeraas wrote: [snip] Found it: http://d.puremagic.com/issues/show_bug.cgi?id=5605 Oo -- nice :) (That it should work, that is; not that it doesn't ;) -- Magnus Lie Hetland http://hetland.org

Re: Overriding iteration

2011-03-04 Thread Steven Schveighoffer
On Fri, 04 Mar 2011 12:13:34 -0500, spir wrote: On 03/04/2011 05:43 PM, Steven Schveighoffer wrote: But with the current compiler, you can use opApply to achieve that behavior. opApply should work but it is supposed to be slower. It depends on the application and aggregate you are trying

Re: Overriding iteration

2011-03-04 Thread Jonathan M Davis
On Friday, March 04, 2011 09:13:34 spir wrote: > On 03/04/2011 05:43 PM, Steven Schveighoffer wrote: > > On Fri, 04 Mar 2011 11:29:08 -0500, Magnus Lie Hetland wrote: > >> From what I understand, when you override iteration, you can either > >> implement the basic range primitives, permitting for

Re: Overriding iteration

2011-03-04 Thread spir
On 03/04/2011 05:43 PM, Steven Schveighoffer wrote: On Fri, 04 Mar 2011 11:29:08 -0500, Magnus Lie Hetland wrote: From what I understand, when you override iteration, you can either implement the basic range primitives, permitting foreach to destructively iterate over your object, or you can

Re: Overriding iteration

2011-03-04 Thread Simen kjaeraas
Simen kjaeraas wrote: Magnus Lie Hetland wrote: From what I understand, when you override iteration, you can either implement the basic range primitives, permitting foreach to destructively iterate over your object, or you can implement a custom method that's called, and that must perfo

Re: Overriding iteration

2011-03-04 Thread Steven Schveighoffer
On Fri, 04 Mar 2011 11:29:08 -0500, Magnus Lie Hetland wrote: From what I understand, when you override iteration, you can either implement the basic range primitives, permitting foreach to destructively iterate over your object, or you can implement a custom method that's called, and th

Re: Overriding iteration

2011-03-04 Thread Simen kjaeraas
Magnus Lie Hetland wrote: From what I understand, when you override iteration, you can either implement the basic range primitives, permitting foreach to destructively iterate over your object, or you can implement a custom method that's called, and that must perform the iteration. The d

Overriding iteration

2011-03-04 Thread Magnus Lie Hetland
From what I understand, when you override iteration, you can either implement the basic range primitives, permitting foreach to destructively iterate over your object, or you can implement a custom method that's called, and that must perform the iteration. The destructiveness of the first optio