Like:
class A
{
volatile int i;
};
A a;
My question is that will the entire a become cv qualified? May be a naive question.
No, all of a will not be volatile. Just as you can have fields of a class that are const without every instance of the class being const, you can have volatile fields that do not make the entire class instance volatile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With