<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/79677>79677</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang++ on Windows fails to define std::any when disabling RTTI
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
joshuamaiche
</td>
</tr>
</table>
<pre>
Disabling RTTI on Clang on Windows prevents std::any from being defined. This does not happen when RTTI is left enabled, or with RTTI disabled on Clang on Linux.
**Repro**
main.cpp:
```
#include <any>
int main()
{
std::any a;
}
```
Errors generated with RTTI disabled (Windows only):
```
>clang++ -std=c++17 -fno-rtti main.cpp
main.cpp:5:5: error: use of undeclared identifier 'std'
std::any a;
^
1 error generated.
```
No errors generated with RTTI left enabled:
`>clang++ -std=c++17 main.cpp`
```
clang version 16.0.5
Target: i686-pc-windows-msvc
Thread model: posix
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyElM2O6jgQhZ_G2ZQSJXb-WGTRQCONNJrFFdKsnbiS-MqxI9uBy9uPTNLd0KI1koECH1fV-XCFOycHjdiQYk-KY8QXPxrb_DZuXPjEZTdi1Bpxa47S8VZJPcCv8_kvMBoOiushBP9KLczVwWzxgto7cF4Q9kbYG9c36K2ZoMVwUmAvNYoEzqN0IAw60MbDyOcZNVxH1Gty6UBh7wE1bxUKQg9gLFylH9d9ce8FxVMXf0u9_ElIeiTp2_ZOw_qFszVruP48camTbp5Di6uuTLe1HWNSd2oRCIQduL4R9v6YVmoPIQehNaG7bafarwEAPNvnhO0_NMeX9d6tNdbBgBot9yheGSW0_qBstLqFuj91z967gITQPaF7iO_NHLv1a1ZB3GsTW-8lfHL4TqXYXoChsxAsDsH0sGiBneIWBUiB2steogVCq1CEVhuBH-wHMqTYSGZr7i_TyUsz_5hV95rO0x15xPE_CD6tfjJ7VfueAi5onTQasjJJk2LdOXM7oA9cZFmX8dzF1_W_iSd36TbNaJELmIxAFZSzcfLPtzqRaJjYsR2PsMmqtGSMFWUdjY2gWGGesjLPsjIv8or15Y61ddvvMtb1RSQbmtI8zWiVFozmdVL0ZZdTUe8KVpZdWZM8xYlLlSh1mRJjh0g6t2BT7cqqihRvUbn7yFO6oaJh-m0T9HG7DI7kqZLOu68MXnqFzeGB7MPs91wqB95sM_58Ce6TLZ4eINFiVTN6P7sgoydCT4P049ImnZkIPYWq20c8W_MbO0_o6W7CEXq6-_gvAAD__yZkaTk">