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 is always true with tuple #1825

Closed
cbegue opened this issue Nov 4, 2019 · 1 comment
Closed

std::is_constructible is always true with tuple #1825

cbegue opened this issue Nov 4, 2019 · 1 comment
Assignees
Labels
confirmed 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 Nov 4, 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::tuple<std::string, Data>>::value, "");
}

With the following error:

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

In this case std::is_constructible<json, std::tuple<std::string, Data>>::value should be false.

@nlohmann
Copy link
Owner

nlohmann commented Nov 5, 2019

Fixed by merging #1826.

@nlohmann nlohmann closed this as completed Nov 5, 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 5, 2019
@nlohmann nlohmann self-assigned this Nov 5, 2019
@nlohmann nlohmann added this to the Release 3.7.1 milestone Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed 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