We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
code:
int i = 948; json scalar = i; std::cout << "<start>\n" << scalar.dump() << "\n<end>\n"; json record; record["scalar"] = scalar; std::cout << "<start>\n" << record.dump() << "\n<end>\n";
g++ 7.2 output:
<start> 948 <end> <start> {"scalar":948} // ok <end>
MSVC 2017 with default c++ standard setting and "ISO C++14 Standard (/std:c++14)" output:
<start> 948 <end> <start> {"scalar":[948]} // why list? <end>
The text was updated successfully, but these errors were encountered:
Is that the exact code you run or are there some brace initializations somewhere?
Sorry, something went wrong.
it is copypaste. i spend some time for war with markdown.
ups. i've found my bug. sorry.
there was wrong typedef
typedef vr::jsn::Packet json;
where
class Packet : public detail::json { public: Packet() = default; Packet(Packet const&) = delete; Packet& operator =(Packet&& p) = default; Packet(detail::json&& j)= default; };
right typedef
typedef nlohmann::json json;
has fixed bug. nonetheless behavior of gcc and msvc is different.
remote work so remote.
No branches or pull requests
code:
g++ 7.2 output:
MSVC 2017 with default c++ standard setting and "ISO C++14 Standard (/std:c++14)" output:
The text was updated successfully, but these errors were encountered: