-
Notifications
You must be signed in to change notification settings - Fork 15.7k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"cwg-issueAn issue that was filed to the Core Working GroupAn issue that was filed to the Core Working Groupdiverges-from:edgDoes the clang frontend diverge from edg compiler on this issueDoes the clang frontend diverge from edg compiler on this issuediverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue
Description
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;
}
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"cwg-issueAn issue that was filed to the Core Working GroupAn issue that was filed to the Core Working Groupdiverges-from:edgDoes the clang frontend diverge from edg compiler on this issueDoes the clang frontend diverge from edg compiler on this issuediverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue