Issue |
131835
|
Summary |
clang accepts partial template specialization without base
|
Labels |
clang
|
Assignees |
|
Reporter |
abellgithub
|
This fails on gcc but works on clang. Note types of `SYMS` template arguments. I think clang is wrong here, but it could be me who's wrong ;)
```
#include <cstdint>
#include <type_traits>
template <int SYMS, typename T=void>
struct arithmetic_c;
template<uint32_t SYMS>
struct arithmetic_c<SYMS, typename std::enable_if<(SYMS > 16 && SYMS < 2048)>::type>
{
arithmetic_c()
{}
};
template<int SYMS>
struct arithmetic_c<SYMS, typename std::enable_if<(SYMS > 1 && SYMS <= 16)>::type >
{
arithmetic_c()
{}
};
int main()
{
arithmetic_c<32> corrector;
return 0;
}
```
[Compiler Explorer](https://godbolt.org/z/MnhqhWofa)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs