Sub-classing templated class without implementing pure virtual method

Posted by LeopardSkinPillBoxHat on Stack Overflow See other posts from Stack Overflow or by LeopardSkinPillBoxHat
Published on 2010-04-07T01:20:45Z Indexed on 2010/04/07 1:23 UTC
Read the original article Hit count: 496

I have the following class definition:

template<typename QueueItemT>
class QueueBC
{
protected:
    QueueBC() {};
    virtual ~QueueBC() {};

private:
    virtual IItemBuf* constructItem(const QueueItemT& item) = 0;
}

I created the following sub-class:

class MyQueue
    : public QueueBC<MyItemT>
{
public:

    MyQueue();
    virtual ~MyQueue();
};

This compiles fine under VS2005, yet I haven't implemented constructItem() in the MyQueue class. Any idea why?

© Stack Overflow or respective owner

Related posts about c++

Related posts about templates