------- Comment #3 from  2009-01-28 08:35 -------
(In reply to comment #1)
> > struct Tuple(T...)
> > {
> >    private T field;
> >    ref T[i] opIndex(size_t i) { return field[i]; }
> > }
> That won't work as the return type of the function would depend on the 
> function
> argument. At least until the requirement for CTFE functions to be evaluatable
> both at compile time and at run time is abolished.

Indeed. I also discussed that with Walter last night and allowing it is
possible but would have ripples through the rest of the compiler.

The feature can be allowed; the problem is that there's no obvious way to allow
it without making it a hack that people will need to learn.


Reply via email to