C++ Logo

std-discussion

Advanced search

Re: Structured binding pack vs expansion statement outside template

From: Anoop Rana <ranaanoop986_at_[hidden]>
Date: Wed, 4 Feb 2026 18:37:41 +0530
You should also provide some code along with its description.

On Wed, 4 Feb 2026, 18:35 Артём Колпаков via Std-Discussion, <
std-discussion_at_[hidden]> wrote:

> Good afternoon. Why can't the structured binding pack be used outside of
> the template, whereas the expansion statement can. It seems to me that for
> tuple-like types there is no significant difference between these language
> features, but to use the first one, you have to use a synthetic template
> where there is no real one. Is this a language defect?
>
> I'm not sure what the documents say about this. I am writing immediately
> after observing the error on goldbolt.
>
> Thank you for your attention.
> Artyom Kolpakov
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
>

Received on 2026-02-04 13:07:55