How to translate this C++ preprocessor declaration in D?

"Luís "Luís
Fri May 24 17:18:28 PDT 2013


I remember that there was a smarter way to do this, but you can 
do it manually. Something like:

     immutable long my_id = 'a' << 24 + 'b' << 16 + 'c' << 8 + 'd';

Or you can create a CTFE function to do this from a string, which 
should be nicer, if you don't find an existing utility for this.


More information about the Digitalmars-d-learn mailing list