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

std::is_constructible<json, std::unordered_map<std::string, Data>> when to_json not defined #1805

Closed
cbegue opened this issue Oct 21, 2019 · 1 comment
Assignees
Labels
kind: bug release item: 🐛 bug fix solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Milestone

Comments

@cbegue
Copy link
Contributor

cbegue commented Oct 21, 2019

Building the following code failed:

#include <string>
#include <tuple>
#include <unordered_map>
#include <nlohmann/json.hpp>

struct Data {
    int mydata;
    float myfloat;
};

int main() {
    using nlohmann::json;

    static_assert(!std::is_constructible<json, std::unordered_map<std::string, Data>>::value, "");
}

With the following error:

static assertion failed
     static_assert(!std::is_constructible<json, std::unordered_map<std::string, Data>>::value, "");

std::is_constructible<json, std::unordered_map<std::string, Data>>::value should be false

@cbegue
Copy link
Contributor Author

cbegue commented Oct 31, 2019

I found the same kind of issue with std::tuple. Do you want I create a new issue with a new PR or can I add the fix for tuple in this PR?

nlohmann added a commit that referenced this issue Nov 1, 2019
@nlohmann nlohmann closed this as completed Nov 1, 2019
@nlohmann nlohmann added release item: 🐛 bug fix solution: proposed fix a fix for the issue has been proposed and waits for confirmation labels Nov 1, 2019
@nlohmann nlohmann self-assigned this Nov 1, 2019
@nlohmann nlohmann added this to the Release 3.7.1 milestone Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug release item: 🐛 bug fix solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants