> seems to run counter to every coding guideline 

C++ wouldn't be C++ if it didn't allow a programmer to intentionally footgun oneself. 

Typically I encounter a desire to footgun myself when I have an RAII variable with side effects on destruction I'd like to intentionally trigger. Specifically something that locks a resource and I need to guarantee it'll eventually be released, so I wrap it in a guard class so I can't forget to manually release control. 

The only other alternative is std::optional which is stack-allocated and provides a reset method, but this requires pulling in the STL. This isn't always possible in low-level code. 

On Tue, Dec 9, 2025, 8:45 p.m. codusnocturnus via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
The only motivation I can discern from the paper is to reuse a name with a different type/meaning, which seems to run counter to every coding guideline I’ve ever seen.

It really seems like the existing solutions (using a different name, like a1 and a2, or an enclosing scope) are better in every way.



Sent from Proton Mail for iOS.


-------- Original Message --------
On Tuesday, 12/09/25 at 17:23 wjf via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
see attachment

--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals