[llvm-bugs] [Bug 45281] New: user defined deduction guide isn't found in case of nested template class if outer template argument is itself a template parameter
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Mar 23 07:38:07 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45281
Bug ID: 45281
Summary: user defined deduction guide isn't found in case of
nested template class if outer template argument is
itself a template parameter
Product: clang
Version: trunk
Hardware: PC
OS: MacOS X
Status: NEW
Severity: enhancement
Priority: P
Component: C++17
Assignee: unassignedclangbugs at nondot.org
Reporter: holger at pirk.name
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
Following up on https://bugs.llvm.org/show_bug.cgi?id=34520, the following does
not work in clang:
```
#include <string>
template <class>
struct Foo {
template <class T>
struct Bar {
Bar(T) { }
};
Bar(char const*) -> Bar<std::string>;
};
int main() {
Foo<int>::Bar bar("abc");
static_cast<void>(bar);
}
template <typename T> void templated() { Foo<T>::Bar bar("abc"); };
```
It is the same example code but the last line is added. MSVC does not seem to
have this problem (according to godbolt.org).
--
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/20200323/ae5577a0/attachment.html>
More information about the llvm-bugs
mailing list