Re: Automatic range creation for class or struct?

2016-02-10 Thread Jesse Phillips via Digitalmars-d-learn
On Wednesday, 10 February 2016 at 00:05:36 UTC, Peka wrote: Hi! I have class (or struct) which realises .length() and .opIndex(size_t) methods. It is possible to create from this class some sort of range using template from std? (I mean that internal counter, .popFront(), .empty() etc metho

Re: Automatic range creation for class or struct?

2016-02-09 Thread Ali Çehreli via Digitalmars-d-learn
On 02/09/2016 04:22 PM, cym13 wrote: On Wednesday, 10 February 2016 at 00:05:36 UTC, Peka wrote: Hi! I have class (or struct) which realises .length() and .opIndex(size_t) methods. It is possible to create from this class some sort of range using template from std? (I mean that internal counte

Re: Automatic range creation for class or struct?

2016-02-09 Thread cym13 via Digitalmars-d-learn
On Wednesday, 10 February 2016 at 00:27:54 UTC, Peka wrote: I don't think anything like that exists in phobos I need definitive answer. I need a precise answer. (sorry, google translator :з) "Definitive" is good, maybe even better in the context. I should have been clearer, sorry. When I

Re: Automatic range creation for class or struct?

2016-02-09 Thread Peka via Digitalmars-d-learn
I don't think anything like that exists in phobos I need definitive answer. I need a precise answer. (sorry, google translator :з)

Re: Automatic range creation for class or struct?

2016-02-09 Thread Peka via Digitalmars-d-learn
On Wednesday, 10 February 2016 at 00:22:46 UTC, cym13 wrote: On Wednesday, 10 February 2016 at 00:05:36 UTC, Peka wrote: Hi! I have class (or struct) which realises .length() and .opIndex(size_t) methods. It is possible to create from this class some sort of range using template from std? (

Re: Automatic range creation for class or struct?

2016-02-09 Thread cym13 via Digitalmars-d-learn
On Wednesday, 10 February 2016 at 00:05:36 UTC, Peka wrote: Hi! I have class (or struct) which realises .length() and .opIndex(size_t) methods. It is possible to create from this class some sort of range using template from std? (I mean that internal counter, .popFront(), .empty() etc metho

Automatic range creation for class or struct?

2016-02-09 Thread Peka via Digitalmars-d-learn
Hi! I have class (or struct) which realises .length() and .opIndex(size_t) methods. It is possible to create from this class some sort of range using template from std? (I mean that internal counter, .popFront(), .empty() etc methods should be added by template.)