Simen kjaeraas <[email protected]> wrote:

What might be appropriate is a function tailconst( T )( T t ) that
returns a tail const version of the passed type. That is, given a
T[], const(T[]), const(T)[], immutable(T[]), or immutable(T)[], it
returns a const(T)[]. For a MyRange!R, const(MyRange!R), or
immutable(MyRange!R), it returns a MyRange!(R).tailconst_t. See bottom
of post for a (naïve) implementation.

To expound further on this, I have created the attached module.
Critique wanted.

--
Simen

Attachment: tailconst.d
Description: Binary data

Reply via email to