Skip to content

Disable implicit conversions from json to std::initializer_list<T> for any T #1118

Description

@tlemo

This is a cherry pick for from #1116: I suspect most ambiguities related to implicit conversions from json to standard containers (and not only) can be avoided by expanding the SFINAE around basic_json::operator ValueType() to explicitly exclude conversions to any std::initializer_list specialization.

It should be an quick, easy and safe fix (even if it doesn't fully address the full range of issues described in #1116). I'd be happy to prepare a patch if it helps.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updated

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions