When are const volatile
objects necessary in C++?
Note: I do understand the need for pointers to const volatile
memory locations, but those don't require the objects themselves to be const
or volatile
.
I'm asking about objects that are themselves of some const volatile
type, for example:
const volatile T obj;
In which situations are these necessary or useful?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…