struct throws errors if it has a DTor
    bearophile 
    bearophileHUGS at lycos.com
       
    Sat Dec  8 05:11:17 PST 2012
    
    
  
Namespace:
> http://dpaste.dzfl.pl/2792b974
import std.stdio;
struct Color {
     static immutable Color Black   = Color(0,     0,   0),
                            White   = Color(255, 255, 255),
                            Red     = Color(255,   0,   0),
                            Green   = Color(0,   255,   0),
                            Blue    = Color(0,     0, 255),
                            Yellow  = Color(0,   255, 255),
                            Magenta = Color(255,   0, 255),
                            Gray    = Color(0.7, 0.7, 0.7);
     ubyte red, green, blue, alpha;
     this(ubyte red, ubyte green, ubyte blue, ubyte alpha = 0) {
...
Bye,
bearophile
    
    
More information about the Digitalmars-d-learn
mailing list