bigger then size_t
Dmitry Olshansky
dmitry.olsh at gmail.com
Tue Oct 9 10:02:52 PDT 2012
On 09-Oct-12 20:36, maarten van damme wrote:
> Another quick question. When I know an array is going to have an
> length smaller then 255, can I use bytes as index or do I have to use
> size_t to make it portable across 64 bit platforms?
>
The real question is why you need that? Byte is not faster (if not
slower). And again you still need to cast to size_t and back (as .length
is size_t).
The only value could probably be to have indexes occupy less space (if
you store them somewhere). Still this needs some extra checks (or at
least asserts).
--
Dmitry Olshansky
More information about the Digitalmars-d-learn
mailing list