2 little enigmas with is & Unqual!
spir
denis.spir at gmail.com
Wed Dec 1 05:20:22 PST 2010
Hello,
1. Why isn't Unqual!(char) == char?
writeln( is( Unqual!(typeof('c')) == char ) ); // false
writeln( is( Unqual!(char) == char ) ); // false
writeln( is( char == char ) ); // true!
(dmd v2.049)
2. Why cannot one write "assert(is(Unqual(t1) == t2))"?
assert( is( char == char ) ); // OK
assert( is( Unqual!(char) != char ) ); // compile Error
assert( is( Unqual!(typeof('c')) != char ) ); // compile Error
(is() gets on my nerves ;-)
Denis
-- -- -- -- -- -- --
vit esse estrany ☣
spir.wikidot.com
More information about the Digitalmars-d-learn
mailing list