Is there any way to have [] overloads use compile-time indexes as is currently done for Tuples?

pineapple via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 27 02:21:04 PDT 2016


I'd really like to define my own types that accept indexes for 
opIndex and opSlice as template arguments. Is there any way to do 
this? If not, this seems like an obvious thing to add to the 
language - what's been holding it back?


More information about the Digitalmars-d-learn mailing list