https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105027
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Ed Catmur from comment #0) > static_assert(BitCastable<long, int()>); // #3: see below > int f(); > long l = std::bit_cast<long>(f); // #4 > > By my reading of [temp.deduct] #3 should be a hard error, since > sizeof(int()) is not only invalid; Your BitCastable concept uses requires (U u) so the decay to a function pointer happens there, and so its std::bit_cast<T>(u) expression *is* valid. i.e. #3 is not testing the same thing as #4