[llvm-bugs] [Bug 50934] New: Address of function template in concept should cause concept to evaluate to false
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jun 29 13:55:14 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50934
Bug ID: 50934
Summary: Address of function template in concept should cause
concept to evaluate to false
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++2a
Assignee: unassignedclangbugs at nondot.org
Reporter: davidfromonline at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
The following valid translation unit
```
template<typename T>
concept foo = requires {
&T::f;
};
struct S {
template<typename T>
void f(T);
};
static_assert(!foo<S>);
```
Is incorrectly rejected by clang with the error message
```
<source>:11:1: error: static_assert failed due to requirement '!foo<S>'
static_assert(!foo<S>);
^ ~~~~~~~
1 error generated.
Compiler returned: 1
```
See it live: https://godbolt.org/z/h7vTqo1Yb
--
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/20210629/465a640e/attachment.html>
More information about the llvm-bugs
mailing list