https://bugs.llvm.org/show_bug.cgi?id=47412
Bug ID: 47412
Summary: Bogus "deduced type is not a specialization of
template 'S'" on qualified name or alias in deduction
guide
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: arthur.j.odw...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk
// https://godbolt.org/z/enb44j
namespace N {
template<class> struct S {};
auto foo() -> N::S<int>; // OK
S() -> N::S<int>; // Bogus error
} // namespace
template<class> struct S {};
auto foo() -> ::S<int>; // OK
S() -> ::S<int>; // Bogus error
using SA = S<int>;
S() -> SA; // Bogus error
This code is obviously "silly", but GCC and MSVC both agree that it is valid
C++17. Clang complains:
test.cpp:5:8: error: deduced type 'N::S<int>' of deduction guide is not a
specialization of template 'S'
S() -> N::S<int>; // Bogus error
^~~~~~~~~
test.cpp:10:8: error: deduced type '::S<int>' of deduction guide is not a
specialization of template 'S'
S() -> ::S<int>; // Bogus error
^~~~~~~~
test.cpp:13:8: error: deduced type 'N::SA' (aka 'S<int>') of deduction guide is
not a specialization of template 'S'
S() -> SA; // Bogus error
^~
--
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