Phobos for Review: std.buffer.scopebuffer

Dicebot public at dicebot.lv
Wed Feb 12 10:55:26 PST 2014


On Wednesday, 12 February 2014 at 18:50:24 UTC, Walter Bright 
wrote:
> grep -i -r lwr *.d
> std\traits.d:        alias G Lwr;
> std\traits.d:            enum ok = functionLinkage!Upr == 
> functionLinkage!Lwr;
> std\traits.d:            enum ok = variadicFunctionStyle!Upr == 
> variadicFunctionStyle!Lwr;
> std\traits.d:            // Note the order of arguments.  The 
> convertion order Lwr -> Upr is
> std\traits.d:            // correct since Upr should be 
> semantically 'narrower' than Lwr.
> std\traits.d:            enum ok = 
> isStorageClassImplicitlyConvertible!(Lwr, Upr);
> std\traits.d:            enum lwrAtts = functionAttributes!Lwr;
> std\traits.d:                (  (uprAtts & wantExact)   == 
> (lwrAtts & wantExact)) &&
> std\traits.d:                (  (uprAtts & FA.pure_   ) >= 
> (lwrAtts & FA.pure_
>  )) &&
> std\traits.d:                (  (uprAtts & FA.nothrow_) >= 
> (lwrAtts & FA.nothrow_)) &&
> std\traits.d:                (!!(uprAtts & safety    )  >= 
> !!(lwrAtts & safety
>   )) ;
> std\traits.d:            enum ok = is(ReturnType!Upr : 
> ReturnType!Lwr);
> std\traits.d:            alias ParameterTypeTuple!Lwr LwrParams;
> std\traits.d:            alias ParameterStorageClassTuple!Lwr 
> LwrPSTCs;
> std\traits.d:                    enum lwrStc = LwrPSTCs[i];
> std\traits.d:                        ((uprStc & wantExact )  == 
> (lwrStc & wantExact )) &&
> std\traits.d:                        ((uprStc & STC.scope_)  >= 
> (lwrStc & STC.scope_)) &&
> std\traits.d:            static if (UprParams.length == 
> LwrParams.length)
> std\traits.d:                enum ok = is(UprParams == 
> LwrParams) && checkNext!(0).ok;
> std\typetuple.d: * type tuple. TL[$(I lwr) .. $(I upr)] returns 
> a new type

Exactly - all those places are internals of few very old 
templates ;) Other than one part of documentation in typetuple, 
have not noticed it initially. It is not even comparable with 
grep results for "lower" and "upper". I'd expect those places in 
std.traits to be fixed too once someone will be working on that 
part of code.


More information about the Digitalmars-d mailing list