[PATCH] MSVC compat: Allow lookup of friend types in enclosing namespaces
rnk at google.com
Wed Jul 9 15:32:18 PDT 2014
Hi rsmith, doug.gregor,
The relevant portion of C++ standard says [namespace.memdef]p3:
If the name in a friend declaration is neither qualified nor a
template-id and the declaration is a function or an
elaborated-type-specifier, the lookup to determine whether the entity
has been previously declared shall not consider any scopes outside the
innermost enclosing namespace.
MSVC does not implement that rule for types. If there is a type in an
enclosing namespace, they consider an unqualified tag declaration with
the same name to be a redeclaration of the type from another namespace.
Implementing compatibility is a simple matter of disabling our
implementation of this rule for types, which was added in r177473.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4010 bytes
Desc: not available
More information about the cfe-commits