<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/94052>94052</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang] Bug with lookup
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
elizabethandrews
</td>
</tr>
</table>
<pre>
The following code compiles with GCC and MSVC but fails with clang
```
namespace a {
template <typename> class b {
public:
typedef int string_type;
operator string_type();
};
} // namespace a
template <class> void c() {
&a::b<char>::operator string_type;
}
```
Godbolt - https://godbolt.org/z/sWs8rvq98
Clang accepts the code if `string_type` is qualified - https://godbolt.org/z/efPd9d8Gz . Based on examples in http://eel.is/c++draft/basic.lookup#unqual-5, I think the lookup should succeed without qualification as well.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMk0FvnDwQhn_NcBktAgPLcuCQ3c1G3-GTKrVqj5WxB3BjMMH2bpNfXxk2ybbNoRIyMH7n5WHGw61V3UhUQ7GH4hhx73oz16TVC2_I9XyUM11s1Bj5XH_pCVujtbmosUNhJKEww6Q0Wbwo1-PD4YB8lPj_568HbLzDlit93ROajx0kR0jurus2uV7L68gHshMXhByh3K9BR8OkuSOE7OCeJwoiyO6DmbXYvAtx8o1WArKrOWKQS2pRjQ6tm9XYfQ8hyF4z0Ew0c2fm37bZDlj1JoLyePuMwE7ATnjD-jfnwhYgz0ZJFKvjDSkiAtvygJrdNSGh5zNk92vgQ6hsj-88HxVvXR-MbIx2uMHeuckGw4W3W-OxmTtgpxdgJ_vN7ubzU7W7TT-EDiEXgiZn0fW0tli1CNvkFmeboLL45LlWrSL5D9-j9pOs5O7hBWPcc0sSzYj0kw9TODtqXAze8ol0rCywkwC2B7aXM28dsFPDrRKxNubRT8AyPwaETQHsgP-h69X4uFCvArS98Vqi9UIQyeUQGu9esQV3yozILV5I6xgjWWeyyioeUZ2WaZlWaZUVUV8nZduWuShKXm7LMmc5yyhlaVVtJSWSt5GqWcLypMhSluZFVsSylelul5ZpSlUrUgl5QgNXOtb6PISiRMpaT3WVJwWLNG9I22X-GFuHhLEwinMd9JvGdxbyRCvr7LuDU04vQ7s0DYoj7n23Dtr6-5Gfdf1HW5TrfRMLMwA7BafrbTPN5geJUOEFLFR-ZTvX7FcAAAD___soR8I">