[clang] [Clang] Bypass TAD during overload resolution if a perfect match exists (PR #136203)
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 30 14:21:52 PDT 2025
alexfh wrote:
This commit changed the behavior of the following code (https://godbolt.org/z/r1q55e1jv / https://godbolt.org/z/GsPqxaf3G):
```
#include <vector>
constexpr unsigned long num = 123;
void foo() {
// OK
(void)std::vector<unsigned long>({num});
// Fail
(void)std::vector<long>({num});
}
```
In the second case Clang choses a different vector constructor. See also https://godbolt.org/z/ecWo4E6z4.
Is this change in the behavior expected?
https://github.com/llvm/llvm-project/pull/136203
More information about the cfe-commits
mailing list