Skip to content
New issue

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

Nonstandard integer type #89

Closed
arnaudbrejeon opened this issue Jun 15, 2015 · 3 comments
Closed

Nonstandard integer type #89

arnaudbrejeon opened this issue Jun 15, 2015 · 3 comments
Assignees

Comments

@arnaudbrejeon
Copy link

Hi,

the following does not build on OSX with C++14:

#include "nlohmann.json.hpp"
using json = nlohmann::basic_json<std::map, std::vector, std::string, bool, int32_t, float>;
int main(int argc, const char * argv[]) {   
    json j;
    j["int_1"] = 1; << Conversion from 'int' to 'nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, int, float, std::allocator>' is ambiguous
    return 0;
}

I'd rather use number type int32_t instead of the default int64_t (which builds properly). Do you have any idea how to fix this issue?
Thank you,

Arnaud

@nlohmann
Copy link
Owner

I understand the problem - it is a conflict with the solution to issue #71. I see what I can do.

@nlohmann nlohmann self-assigned this Jun 15, 2015
@nlohmann nlohmann mentioned this issue Jun 15, 2015
@nlohmann nlohmann changed the title Build issue on OSX with C++14 Nonstandard integer type Jun 15, 2015
@nlohmann
Copy link
Owner

Your code example should work now - I added a respective test case.

@arnaudbrejeon
Copy link
Author

It's working perfectly. Thank you for your super-fast feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants