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

Structured binding support #11

Open
Bvsemmer opened this issue Oct 27, 2022 · 0 comments
Open

Structured binding support #11

Bvsemmer opened this issue Oct 27, 2022 · 0 comments

Comments

@Bvsemmer
Copy link

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.

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

No branches or pull requests

1 participant