https://bugs.llvm.org/show_bug.cgi?id=52366

            Bug ID: 52366
           Summary: Wrong processing of substitution failure in an atomic
                    constraint of template function requires-clause
           Product: clang
           Version: 13.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangb...@nondot.org
          Reporter: fchelno...@gmail.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

Below code is valid, because sizeof(int)>0:
```
template<class T, class U>
void g() requires(sizeof(T)>0 || sizeof(U)>0) {}

int main() { 
    g<void,int>(); //error in Clang
}
```
It is accepted by GCC, but unfortunately not by Clang. Demo:
https://gcc.godbolt.org/z/P69beYhqY

Related discussion: https://stackoverflow.com/q/69173117/7325599

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to