vivkin / gason

Lightweight and fast JSON parser for C++
MIT License
338 stars 51 forks source link

Cannot compile gason.cpp on Visual Studio 2012 C++ #22

Open Alexk12 opened 8 years ago

Alexk12 commented 8 years ago

This code does not compile in MS Visual Studio 2012 C++: inline JsonIterator begin(JsonValue o) { return JsonIterator{o.toNode()}; }

(Compiled OK in MS Viaual Studio 2015 Community + Update 1, but I use VS 2012 C++ for my project as VS 2015 Community is buggy.)

Can you please fix it or can you describe how to fix it by myself to compile it on VS 2012?

Best regards, Alexander

P.S. And please replace one known 3-letter Russian word from test-suite.cpp, bad style and "plokhaya primeta, programma budet plokho rabotat'" .

vivkin commented 8 years ago

Maybe this fix the problem:

inline JsonIterator begin(JsonValue o) {
    JsonIterator it;
    it.p = o.toNode();
    return it;
}

btw gason can compile in vs2013, early versions as I know.