[llvm-bugs] [Bug 41040] New: ICE in infinite instantiation of recursive template member function
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Mar 11 21:45:25 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41040
Bug ID: 41040
Summary: ICE in infinite instantiation of recursive template
member function
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: andrey.a.davydov at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
struct CallMe {
template <typename Arg>
auto operator()(Arg arg)
-> decltype((*this)(arg));
// The issue is that Clang considers class `CallMe`
// as callable in this point, if replace `(*this)(arg)`
// to explicit function call `this->operator()(arg)`
// the issue will be resolved.
};
void test(CallMe f) {
f(239);
}
https://godbolt.org/z/QghBya
--
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/20190312/349cb672/attachment.html>
More information about the llvm-bugs
mailing list