On Thu, Apr 27, 2023 at 1:36 PM Julien Villemure-Fréchette <julien.villemure@hotmail.com> wrote:
Forgot to explain why casting from function pointer to non const object _should_ be okay. But while thinking about it, I noticed a loophole in my reasoning. Actually, the most sensible semantics would be to reject such a cast, as it makes it possible to cast away const on an object via a function pointer type.


What about C-style casts?  (See one of my other mails in this thread for how it's a C-style cast that ironically can't remove constness)