I want to assign an object to volatile object in the same type, but failed to do so with compiler error. How to change the program to make it? Besides to make it to work, wh
I have encounted the same question. For example:
struct A { int i; } volatile A a; A b; a = b; // C2678 here.
I found this method to resolve it:
const_cast(a) = b;