[llvm-bugs] [Bug 46856] New: CTAD fails on nested templated class
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jul 26 15:46:24 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46856
Bug ID: 46856
Summary: CTAD fails on nested templated class
Product: clang
Version: 10.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++17
Assignee: unassignedclangbugs at nondot.org
Reporter: narut.se 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 snippet doesn't compile on clang (10), due to CTAD failing. It
occurs when the parent class is templated:
template <class U>
struct X {
template <class T> struct Y {
T y;
Y(T t) : y(t) {}
};
auto test() const {
return Y(10);
}
};
auto test() {
return X<int>().test();
}
The snippet compiles on msvc and gcc:
https://godbolt.org/z/Wq6Paf
--
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/20200726/2a0f5b80/attachment.html>
More information about the llvm-bugs
mailing list