Issue 114803
Summary [clang][regression] clang can not distinguish similar class partial specialization with requires clause since clang 16
Labels clang
Assignees
Reporter wanghan02
    Example code could be found below or on [godbolt](https://godbolt.org/z/o1Goex5vz). The code compiles fine with gcc, MSVC and clang 15. It fails with clang 16 onwards.

```
#include <concepts>

template <typename T1, typename T2>
struct S {};

template <typename TI, typename Tf>
 requires std::same_as<TI, int> && std::same_as<Tf, double>
struct S<TI, Tf> {
    using type = void;
};

template <typename TI, typename Tf>
    requires std::same_as<Tf, double> && std::same_as<TI, int>
struct S<Tf, TI> { // since clang16: error: class template partial specialization is not more specialized than the primary template
    using type = void;
};

static_assert(std::same_as<typename S<int, double>::type, void>);
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to