class foo {
public:
static int func(const char*& p) const;
};
Why is this fragment incorrect ?
The const function modifier is supposed to claim that the function will not modify any member variables (not a "mutator" if you want to).
But a static function, by definition, cannot access the member variables. So this function declaration doesn't make sense.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment