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: unassignedclangb...@nondot.org
Reporter: andrey.a.davy...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs