"IndexType" for ranges

Simen Kjaeraas simen.kjaras at gmail.com
Tue Oct 2 09:29:28 PDT 2012


On 2012-10-02, 18:09, Peter Alexander wrote:

> On Tuesday, 2 October 2012 at 13:17:45 UTC, monarch_dodra wrote:
>> If you've ever worked on a template that needs to index a range, you  
>> may have run into this problem: What is the type you should use to  
>> index an RA range?
>
> Forgive my ignorance. What's wrong with size_t?

That not all ranges use it? If the range uses int, short, byte
(I wonder why they'd do it, though), using size_t will not even
compile.

-- 
Simen


More information about the Digitalmars-d mailing list