mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 00:16:39 +00:00

D128750 incorrectly skips constraints partial ordering for deduction guide. This patch reverts that part. Fixes https://github.com/llvm/llvm-project/issues/58456.
21 lines
301 B
C++
21 lines
301 B
C++
// RUN: %clang_cc1 -std=c++20 -verify %s
|
|
// expected-no-diagnostics
|
|
|
|
namespace pr58456 {
|
|
template<typename>
|
|
struct s {
|
|
constexpr s(auto) {
|
|
}
|
|
};
|
|
|
|
template<typename T>
|
|
s(T) -> s<int>;
|
|
|
|
template<typename T> requires true
|
|
s(T) -> s<int>;
|
|
|
|
void f() {
|
|
auto const y = s(0);
|
|
}
|
|
}
|