[Cs3] const_cast question in class
Mikhail Nesterenko
mnestere at kent.edu
Wed Oct 29 17:00:05 EDT 2025
> My question in class was mainly what would happen/the functionality
> of un consting a function name since they are just const function
> pointers. Could you do pointer artithmetic with them? Could you
> assign it a new function pointer?
>
Function pointers and pointers to member functions are not subject to
const_cast as per
https://en.cppreference.com/w/cpp/language/const_cast.html
So, finally, we found something that C++ does not allow us to do.
--
Mikhail
More information about the cs3
mailing list