Skip to content

Structured binding support #11

Description

@Bvsemmer

Hey!

I am integrating tao::tuple in an existing std::tuple code base. Problem that I run into is that this particular code base is using Structured Bindings very heavily to get access to the tuple members.
tao::tuple as of now has no support for it. I was looking to add support for that, but I am struggling a bit. And perhaps some of the maintainers can give some assistance.

I fear that since tao::tuple is inheritence based, support will be impossible. But perhaps there is a way I do not see?

When trying to create a structured bindng for a tao::tuple, like this:
const auto tuple = tao::make_tuple(1, 2); const auto [v1, v2] = tuple;
I get the following error:

the number of identifiers must match the number of array elements or members in a structured binding declaration

Since tao::tuple decomposes into a single type: tuple_base.

Any help is greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions