January 30, 2007Re: Conditional Templates
Posted in reply to Derek Parnell
"Derek Parnell" <email@example.com> wrote in message news:firstname.lastname@example.org... > So it seems that D regards characters and > integers as interchangeable entities, which is just not correct. I know > that characters are implemented in memory as integers, but they are > conceptually different things, and just sometimes coders need to treat > them > as different things. I hate this too. I've ended up writing all kinds of ugly templates to deal with this problem. I also really like this one: static assert(is(bool : dchar)); This passes. This caused a very difficult-to-find bug in MiniD, because never in a million years would I have expected bool to be implicitly convertible to dchar.
Copyright © 1999-2016 by the D Language Foundation