Is this a pure abstract class?
class C
{
public:
static const std::string S;
C() {}
virtual ~C() {}
virtual void v() = 0;
}
I believe it is not, following this definition from WikiBooks:
A pure Abstract class has only abstract member functions and no data or concrete member functions.
It can't be pure abstract because it does not have only abstract member functions:
- It has a virtual destructor, which is a member function, but not abstract. It is not a pure destructor. Note that "abstract method" and "pure virtual function" are the same things, and that the term "method" and "function" are synonymous.
- It has an attribute S, which represents data.
Now my teachers claim it is a pure abstract class, because:
Constants included in a pure virtual class are not considered attributes. They are immutable elements of a class and therefore they don't violate its abstractness. The same holds for static methods.