On Wednesday, January 14, 2026, Thiago Macieira via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
On Tuesday, 13 January 2026 15:50:02 Pacific Standard Time Frederick Virchanza
Gotham via Std-Proposals wrote:
> No actually it's a bit longer than that:
>
>     if ( decltype(auto) x = SomeFunction() ) return
> !static_cast<decltype(x)>(x);

Why are you casting x to x's type?

And how often do you need to do that anyway?



Just in case SomeFunction returns an Rvalue reference