Filling a char array with letters and element type of char[]

Tobias Pankrath via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 3 01:06:03 PST 2015


> I have three questions?
>
> If I change the iterator which I get from algorithm, the owner 
> data will change or not?
>
> How to use std.algorithm.fill with char types?
>
> What is the type of char array holds why it does not matches 
> char?
>
> Regards
> Kadir Erdem

I have no time to dig into this, but:

is(typeof(arr.front = 'a')) does _not_ check if arr.front is of 
type char. It is true if you can assign an 'a' to arr.front.

is(typeof(_expr_)) is another way to write __traits(compiles, 
_expr).

So, either the range returned by until has elements that are not 
assignable or the reason is that until returns a range of dchar, 
because all string types are treated as ranges of dchar.



More information about the Digitalmars-d-learn mailing list