View mode: basic / threaded / horizontal-split · Log in · Help
January 30, 2007
Re: Conditional Templates
"Derek Parnell" <> wrote in message 

> 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.
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home