Skip to content

Empty tuple conversion fails to compile #1196

Description

@jrade

Automatic conversion between std::tuple<> and boost::json::value does not work.
The code

std::tuple<> t0;
boost::json::value v = boost::json::value_from(t0);
std::tuple<> t1 = boost::json::value_to<std::tuple<>>(v);

fails to compile with the error message

static assertion failed: 'No suitable tag_invoke overload found for the type'.

This seems counterintuitive. Obviously an empty C++ tuple should be converted to an empty JSON array and vice-versa.

Tested with Boost 1.92.0 and Visual Studio 2026 on Windows 11.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions