C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Structured binding without type inference

From: Tiago Freire <tmiguelf_at_[hidden]>
Date: Sun, 12 May 2024 07:14:20 +0000
> The automatic type deduction reduces the verbosity of code which makes it easier to work with structured data. If you really like it, you can make use of std::tie.

It's not the same thing. You cannot const initialize with a tie.
auto reduces verbosity but also clarity, reason why it's right out banned in many coding standards, and depending on who you ask it is considered bad practice.

Received on 2024-05-12 07:14:27