Date: Mon, 21 Sep 2026 14:28:04 +0200
There is a high risk of name collision, as std::bit_cast is already part of
the STL.
Typing `std::` as a prefix is a fair tradeoff to avoid any naming collision.
I have see a code base with a local variable named `bitCast`, and I guess
any code base using snake_case could need such a name at some point.
Adding keywords is no easy job, and should be avoided whenever possible.
If you really want a keyword in your projects, just use a macro pointing to
your compiler's built-in.
Le lun. 21 sept. 2026, 13:51, Liam Graham via Std-Proposals <
std-proposals_at_[hidden]> a écrit :
> Compilers are already smart at recognising and optimising it, so why not
> make it a keyword? It helps avoid people just breaking strict aliasing rules
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
the STL.
Typing `std::` as a prefix is a fair tradeoff to avoid any naming collision.
I have see a code base with a local variable named `bitCast`, and I guess
any code base using snake_case could need such a name at some point.
Adding keywords is no easy job, and should be avoided whenever possible.
If you really want a keyword in your projects, just use a macro pointing to
your compiler's built-in.
Le lun. 21 sept. 2026, 13:51, Liam Graham via Std-Proposals <
std-proposals_at_[hidden]> a écrit :
> Compilers are already smart at recognising and optimising it, so why not
> make it a keyword? It helps avoid people just breaking strict aliasing rules
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
Received on 2026-09-21 12:28:20
