Issue 79677
Summary Clang++ on Windows fails to define std::any when disabling RTTI
Labels clang
Assignees
Reporter joshuamaiche
    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
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to