Ancient piece of code started giving troubles: When MSVC_FIX_VOLATILE is nothing, it appears that optimizing compiler forgets pT and uses just some variation of adjusted this, which makes sense overall because static cast between the two can be resolved at compile time. However, the problem is that the value of this is wrong and there…