https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124096
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Blocks| |123615
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot
gnu.org
Keywords| |accepts-invalid
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2026-02-13
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Maybe we want:
--- a/libstdc++-v3/include/std/bit
+++ b/libstdc++-v3/include/std/bit
@@ -93,6 +93,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
&& is_trivially_copyable_v<_To> && is_trivially_copyable_v<_From>
#endif
{
+#if __cpp_impl_reflection >= 202506L
+ static_assert(!is_consteval_only_v<_To> && !is_consteval_only_v<_From>,
+ "neither To nor From can be consteval-only types");
+#endif
return __builtin_bit_cast(_To, __from);
}
#endif // __cpp_lib_bit_cast
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123615
[Bug 123615] (c++-reflection) - [meta-bug] reflection issue