[llvm-bugs] [Bug 51856] New: Can't constrain the auto introducing a trailing-return-type
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 14 10:11:08 PDT 2021
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: unassignedclangbugs at nondot.org
Reporter: johelegp at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
johelegp at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210914/af82131d/attachment.html>
More information about the llvm-bugs
mailing list