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

            Bug ID: 51856
           Summary: Can't constrain the auto introducing a
                    trailing-return-type
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: compile-fail
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

This does not appear to be forbidden by [dcl.spec.auto.general].

See https://godbolt.org/z/96GcvfMdK.

```C++
template<class>concept C=true;
C auto f()->int;
```

```
<source>:2:1: error: function with trailing return type must specify return
type 'auto', not 'C auto'
C auto f()->int;
^~~~~~
1 error generated.
Compiler returned: 1
```

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

Reply via email to