Given the following code:
char[5] a = ['a', 'b', 'c', 'd', 'e'];
alias Range = char[];
writeln(is(ElementType!Range == char));
One would expect that the program will print true. In fact, it
prints false and I noticed that if Range is char[], wchar[],
dchar[], string, wstring, dstring
Unqual
On 23/11/2016 2:29 AM, RazvanN wrote:
Given the following code:
char[5] a = ['a', 'b', 'c', 'd', 'e'];
alias Range = char[];
writeln(is(ElementType!Range == char));
One would expect that the program will print true. In fact, it prints
false and I noticed that if Range is char[], wchar[], dch
On Tuesday, 22 November 2016 at 13:29:47 UTC, RazvanN wrote:
Given the following code:
char[5] a = ['a', 'b', 'c', 'd', 'e'];
alias Range = char[];
writeln(is(ElementType!Range == char));
One would expect that the program will print true. In fact, it
prints false and I noticed that if Range
Dne 22.11.2016 v 14:29 RazvanN via Digitalmars-d-learn napsal(a):
Given the following code:
char[5] a = ['a', 'b', 'c', 'd', 'e'];
alias Range = char[];
writeln(is(ElementType!Range == char));
One would expect that the program will print true. In fact, it prints
false and I noticed that if
Dne 22.11.2016 v 14:29 RazvanN via Digitalmars-d-learn napsal(a):
Given the following code:
char[5] a = ['a', 'b', 'c', 'd', 'e'];
alias Range = char[];
writeln(is(ElementType!Range == char));
One would expect that the program will print true. In fact, it prints
false and I noticed that if
On Tuesday, 22 November 2016 at 13:29:47 UTC, RazvanN wrote:
Is this a bug?
The language is sane. The standard library is not alas, it is
insane by design, so not a bug.
On Tuesday, November 22, 2016 13:29:47 RazvanN via Digitalmars-d-learn
wrote:
> Given the following code:
>
> char[5] a = ['a', 'b', 'c', 'd', 'e'];
> alias Range = char[];
> writeln(is(ElementType!Range == char));
>
> One would expect that the program will print true. In fact, it
> prints f
On Tuesday, 22 November 2016 at 13:29:47 UTC, RazvanN wrote:
Given the following code:
char[5] a = ['a', 'b', 'c', 'd', 'e'];
alias Range = char[];
writeln(is(ElementType!Range == char));
One would expect that the program will print true. In fact, it
prints false and I noticed that if Range
On Tuesday, 22 November 2016 at 14:23:28 UTC, Jonathan M Davis
wrote:
On Tuesday, November 22, 2016 13:29:47 RazvanN via
Digitalmars-d-learn wrote:
[...]
You misunderstand. char[] is a dynamic array of char, wchar[]
is a dynamic array of wchar[], and dchar[] is a dynamic array
of dchar. Ther