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

            Bug ID: 50337
           Summary: Concept subsumption broken with constrained +
                    unconstrained parameter with terse syntax
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangb...@nondot.org
          Reporter: davidfromonl...@gmail.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

The following valid translation unit:

```
template<typename T>
concept foo = true;

template<typename T>
concept foo2 = foo<T> and true;

void f(foo auto, auto) {
}
void f(foo2 auto, auto) {
}

void f() {
        f(1, 1);
}
```

is rejected with

```
<source>:13:2: fatal error: call to 'f' is ambiguous
        f(1, 1);
        ^
<source>:7:6: note: candidate function [with auto:1 = int, auto:2 = int]
void f(foo auto, auto) {
     ^
<source>:9:6: note: candidate function [with auto:1 = int, auto:2 = int]
void f(foo2 auto, auto) {
     ^
1 error generated.
Compiler returned: 1
```

This was broken in a recent commit (past couple of days). It's fine with
46c17429bc86dc5ccddb5512b77bd1ede39c9ccd but fails with
72797dedb720fae22682fc884cbf741c5a2066c2.

See it live: https://godbolt.org/z/EaGMs8dhT

-- 
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