majintao0131 / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Emitter class should understand long long types. #82

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When the Emitter class is used with long long or unsigned long long, you get a 
compilation-time error in Mac OS/X, gcc 4.2 and probably other configurations 
too.

Simple fix is to add these next two lines to emitter.h:

    inline Emitter& operator << (Emitter& emitter, long long v) { return emitter.WriteIntegralType(v); }
    inline Emitter& operator << (Emitter& emitter, unsigned long long v) { return emitter.WriteIntegralType(v); }

Seems to work nicely and doesn't seem that it would compromise any old code...

Original issue reported on code.google.com by tom.ritc...@gmail.com on 12 Nov 2010 at 11:02

GoogleCodeExporter commented 9 years ago
Done, r427. Thanks!

Original comment by jbe...@gmail.com on 15 Nov 2010 at 1:46