visual c++ - qualified names in C++ class declaration -
according this page, class name can "optionally qualified". thus, expect following code compile:
struct ::globalst {};
in msvc 2013u4, error:
error 1 error c2039: 'globalst' : not member of '`global namespace''
am misinterpreting reference or msvc bug?
if define class qualified name, name must have been declared. [class]/11
if class-head-name contains nested-name-specifier, class-specifier shall refer class declared directly in class or namespace nested-name-specifier refers, or in element of inline namespace set (7.3.1) of namespace (i.e., not merely inherited or introduced using-declaration), , class-specifier shall appear in namespace enclosing previous declaration. in such cases, nested-name-specifier of class-head-name of definition shall not begin decltype-specifier.
Comments
Post a Comment