You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two components to this failure. The first one can also be reproduced without the range-based for loop, with code such as this:
template void g();
template void f() {
g(T());
}
namespace N { struct S {}; }
void g(N::S);
template void f<N::S>();
This asserts in much the same way as the range-based for example. The issue is that the two-phase name lookup diagnostic is finding names which aren't appropriate for the call, and trying to build calls with them anyway.
The second issue is that the __range variable should not be visible to name lookup.
Extended Description
On r133816, the following test case asserts.
template
struct S {
void f() {
for (auto &a : e)
__range(a);
}
T e[10];
};
void g() { S().f(); }
The text was updated successfully, but these errors were encountered: