std.array.array seems to return flatten copy of input
Olivier Grant
against.the at evil.bots.com
Fri Apr 4 13:55:17 PDT 2014
Yes, that definitely seems like a good start. To be honest, I not
familiar enough yet with how you are suppose to organise your
source code in D.
Is there any agreed-on naming convention when it comes to member
variables to avoid that kind of name clash ?
Thanks,
O.
On Friday, 4 April 2014 at 20:44:36 UTC, bearophile wrote:
> Olivier Grant:
>
>> Is there any way to hide Splicer.array to the outside world?
>
> If your splice is inside another module, and you tag the array
> field with private, you will receive an error:
>
>
> auto splice( size_t N, R )( R range )
> if(isInputRange!R)
> {
> struct Splicer
> {
> private R array;
>
>
> This avoids your mistake, but also forbids you to use the
> std.array.array on a splice with UFCS. Is this acceptable for
> you?
>
> Bye,
> bearophile
More information about the Digitalmars-d-learn
mailing list