https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98660

--- Comment #2 from Gašper Ažman <gasper.azman at gmail dot com> ---
Ivan: indeed, you could use a static cast, or a macro - you're literally just
changing the value category of the expression to its original one. The cast is
safe.

The reason Niebler and friends (including me) are using the c-style cast is
purely because it's short, concise, unambiguous, and fast to compile.
`static_cast<decltype(x)>(x)` is a lot longer than `(T&&)x`. When you have 6 or
10 of these expressions (often with `...`s) in a function declaration (please
see the `tag_invoke` definition linked), the noise starts to matter.

Reply via email to