MSVC error driving me nuts
    Andreas Pakulat 
    apaku at gmx.de
       
    Sun Sep 21 00:23:31 CEST 2008
    
    
  
Hi,
even though I've recently read the templates chapter in my stroustrup,
it seems I'm still missing something.
Suppose I have the following two class definitions:
template <typename T> class AbstractBuilder 
{
protected:
    virtual void setContextOnNode( T * node, Context* ) = 0;
public:
    void deleteContextOnNode( T* node ) 
    {
        delete contextFromNode( node );
        setContextOnNode( node, 0 );
    }
};
class MyBuilder : public AbstractBuilder<AST>
{
protected:
    virtual void setContextOnNode( AST*, Context* ) {}
};
MSVC barfs on the setContextOnNode line in AbstractBuilder, telling me
that "setContextOnNode" is an unknown identifier, or rather that the
identifier cannot be found. 
Now I don't really understand why it thinks so or how to fix this. Of
course this compiles just fine with gcc/linux.
The actual code is
trunk/KDE/kdevplatform/language/duchain/builders/abstractcontextbuilder.h
trunk/KDE/kdevelop/languages/cpp/cppduchain/contextbuilder.h
Can somebody please let me know where I'm misunderstanding something?
Andreas
-- 
You are the only person to ever get this message.
    
    
More information about the Kde-windows
mailing list