The rules did change but I don't think that's the problem. I think it's just that Microsoft started applying the existing ones.
It's a tricky case but I think the problem can be summarized as trying to use a protected member function pointer as a template parameter to a function that does not have access to that member.
The two ways to solve this are to give the
create
function the access it needs or to unprotect the
access
function which is definitely the last resort.
The easiest way I can see to give the
create
function access without wider impact on the code is to make the delegate a friend of
ModalBaseWindow
class ModalBaseWindow : public DwlWinObject {
friend class DwlDelegate;
protected:
int a;
void accept(DwlWinObject*) {
a=0;
}
};
The problem with this is that template member friend rules are about the outer limits of the C++ spec and are even more likely to be broken in the MSVC compiler than what you already have. Anyway, give it a try and let me know.