|
|
|
|
|
by AlotOfReading
1117 days ago
|
|
For some additional context, this came up for me because some other team had snuck verbiage into our style guide that mandated things like this instead of traditional initializers: void foo() {
if (auto [a, b, c] = std::make_tuple(x, y, z); true) { /* [...] */ }
}
Yeah you can still read this, but it's stupid to support constructs creating scope, doing control flow, and initializing arbitrarily many variables simultaneously (which may invoke constructors of their own). The relatively minor benefits to things like iterators are not outweighed by the burden of supporting this stupid code. |
|