| Issue |
182344
|
| Summary |
[Clang] Regression causing ambiguous call error related to alias template (derived from issue in Unreal Engine)
|
| Labels |
c++20,
clang:frontend,
regression:22
|
| Assignees |
|
| Reporter |
nga888
|
The following code no longer compiles successfully with Clang 22:
``` C++
#include <type_traits>
template <typename T>
requires(!std::is_array_v<T>)
void f() {}
template <typename T>
requires(std::is_bounded_array_v<T>)
void f() = delete;
struct Bar {};
template <typename T> using Foo = Bar;
template <typename T> void use() { f<Foo<T>>(); }
```
and produces the following error:
``` bash
$ clang++ -std=c++20 -c test-case.cpp
test-case.cpp:15:36: error: call to 'f' is ambiguous
15 | template <typename T> void use() { f<Foo<T>>(); }
| ^~~~~~~~~
test-case.cpp:5:6: note: candidate function [with T = Bar]
5 | void f() {}
| ^
test-case.cpp:9:6: note: candidate function [with T = Bar] has been explicitly deleted
9 | void f() = delete;
| ^
1 error generated.
```
This issue was discovered whilst attempting to compile Unreal Engine 5.6 with Clang 22.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs