[llvm-bugs] [Bug 46589] New: access to a static inline member pointer from a template function
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jul 5 01:20:38 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46589
Bug ID: 46589
Summary: access to a static inline member pointer from a
template function
Product: clang
Version: 10.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++17
Assignee: unassignedclangbugs at nondot.org
Reporter: tilin97 at yandex.ru
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
The following code
template<typename T>
class F {
public:
template<typename V>
static void foo(V T::*) {
p<bool> = nullptr;
}
template<typename V>
static inline V T::* p;
};
struct A;
template class F<A>;
int main() {
}
compiles with
<source>:10:18: error: member pointer refers into non-class type 'bool'
static inline V T::* p;
^
<source>:6:3: note: in instantiation of static data member 'F::p' requested
here
p<bool> = nullptr;
^
https://godbolt.org/z/NX7VmH
--
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/20200705/ecfce1e8/attachment.html>
More information about the llvm-bugs
mailing list