access declaration can only be applied to a base class member
i'm using the observer pattern. I've a class that implements the publisher class:
class foo : public Publisher<const RecoveryState &>,
public Publisher<char &>,
therin in try to bind the attach function:
using Publisher<const RecoveryState &>::attach;
using Publisher<const char &>::attach;
the RecoveryState works, but at the char lin开发者_JS百科e the following error occurs:
Error 5 error C3210: 'Publisher' : access declaration can only be applied to a base class member c:\projekte\ps3controlmodule\tbfcontrol\tbfcmdhandler.h 363
There is a discrepancy "char&" vs. "const char&".
'Publisher<const char &>' is not a base class - 'Publisher<char &>' is.
精彩评论