"Virtual" is qualifier or keyword in C++?
+3
A:
'virtual' is a keyword and a qualifier. C++ is case sensitive and won't understand 'Virtual'.
Chubsdad
2010-09-24 10:06:09
+12
A:
virtual is a keyword and a function-specifier. It's not a qualifier. C++ only talks about cv-qualifiers (i.e. const and volatile); the only other uses of the word qualifier refer to scope resolution prefixes (i.e. global :: and ns:: and class_name:: prefixes) in qualified ids.
Charles Bailey
2010-09-24 10:06:10
And the C++ spec talks about a template name to be "explicitly qualified by the template arguments". It also uses the term during overload resolution to say "x.foo" is a qualified call and "foo" (as well as "x::foo") etc is an unqualified call. I find that confusing though :
Johannes Schaub - litb
2010-09-24 12:15:43