majintao0131 / yaml-cpp

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

Support for 'long long' int types #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Emitter out;
2. out << ~0ull

What is the expected output? What do you see instead?
- I get a compile error:

emitter.h(81): error: more than one instance of overloaded function
"YAML::Emitter::Write" matches the argument list:
    function "YAML::Emitter::Write(int)"
    function "YAML::Emitter::Write(bool)"
    function "YAML::Emitter::Write(float)"
    function "YAML::Emitter::Write(double)"
    argument types are: (unsigned long long)
    object type is: YAML::Emitter
                return emitter.Write(v);

What version of the product are you using? On what operating system?
- 0.2.4

Original issue reported on code.google.com by klim...@gmail.com on 10 Mar 2010 at 9:16

GoogleCodeExporter commented 9 years ago
In the current revision, the emitter has a function

    template<typename T> Emitter& Emitter::WriteIntegralType(T);

(This kind of function is actually all any of the operator << overloads call.) I
didn't overload operator << for any long long types, but you can just call
WriteIntegralType to get that functionality.

(N.B. I'm a little hesitant to overload with long long types, since they're not 
in
the C++ standard.)

Original comment by jbe...@gmail.com on 10 Mar 2010 at 11:06