struct Foo {
using Type = bool;
};
int main() {
typename Foo::Type b = false;
return 0;
}
In §14.2p5:
[ Note: As is the case with the typename prefix, the template prefix is allowed in cases
where it is not strictly necessary; i.e., when the nested-name-specifier or the expression
on the left of the -> or . is not dependent on a template-parameter, or the use does not appear
in the scope of a template. — end note ]
Feb 28, 2014
[C++11] Relax of using typename on non-dependent type.
Am I wrong or is VS2013 wrong (usage of typename)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.