<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/136608>136608</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-cl] Cannot compile a nested struct with member named `std::string Name;`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Nemirtingas
</td>
</tr>
</table>
<pre>
Hi,
I encountered an issue where clang-cl and clang couldn't compile some code, I Attached reproductible source.
If I remove `std::string name;` from `Struct2_t`, it compiles.
You can compile this code using my docker image: `nemirtingas/windowscross_vcpkg:msvc2022_14.40.33807_win10.0.18362.0_clang18`, this issue is about clang 19 but I first discovered it in clang 18 and the issue seems to be the same.
[main.zip](https://github.com/user-attachments/files/19840025/main.zip)
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8kz-PozAQxT-NaUZBxgYCBUV2V9Gl2eaqqyJjD-BbbEf-k2jv059wstnmdBUCDW_e-_lZhKBniziQ5oU0b4VIcXF-eEejfdR2FqEYnfocfmjCXgk9EHo4AVrpko3oUYGwoENICLcFPYJchZ13cgVh1f0FpEursoTtI0hnLnpFCM4gSKeQsFc4wSFGIRdU4PHinUoy6jFPJS-xhG3nBCfwaNwVgbQ0REX4gfBDiF7bGawwSPgLaSlM3plt5Gf0SUZ2jqSl2xb93B7Ke45fLoEU9mkqLjpkU5DCJmo-QTn5gR60ETMSfth07TcZwo43bZW7BeldCOervHzMhB9MuEpGGTtXdVnTkvOO7s83bSta0rLqeMtKes5squ7hLu--c9QBxOhSfNCrehhThBNM2ocISgfprpm8jqDt11SXgccFHyoB0QSIDkbMX4Mw-MhNmhcjtC3_6Atp3gjrlhgvYePJjoQdZx2XNJbSGcKOKaDfiXw8Bm3cIk8bQsKOVd_VlLKGsONTjvWFGrjqeS8KHKp93bC247wrlqGhVLW9alB0tOL9RFs6tU3P-_0kheqbQg-MsobWrGK0bnhXjkJOe0VbOdZK9aInNUUj9Fqu69WUzs9FjjpUvG1pV6xixDXkHjNm8XYHQRjbau2H7afdmOZAarrqEMO3TNRxzRfgq7ykeYNXYa37bqwAiyGigpB7BTcdFzBoRvS5fepftXx_1rJIfh3-w3nz8njsLt79RhkJO-YEmfU94nVgfwMAAP__Dfkx7g">