• konstantin@mysql.com's avatar
    Microsoft VC++ won't compile class C { static const int I=1; }. · 17c845bc
    konstantin@mysql.com authored
    Putting initialization into .cc will reduce compiler's abilities
    to optimize this constant away.
    Defines are not OK as they bloat global namespace.
    Looking for a way to declare an efficient named constant in reduced
    namespace (i. e. in  a class).
    Let's try enums: normally they should be implicitly casted to int.
    Let's see if we really have a compiler which won't do that.
    
    17c845bc
protocol.cc 28.5 KB