This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79954] New: [C++17] Explicit deduction guide not rejected when defined outside inline namespace enclosing the type
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 07 Mar 2017 23:45:42 +0000
- Subject: [Bug c++/79954] New: [C++17] Explicit deduction guide not rejected when defined outside inline namespace enclosing the type
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79954
Bug ID: 79954
Summary: [C++17] Explicit deduction guide not rejected when
defined outside inline namespace enclosing the type
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
inline namespace x
{
template<typename T>
struct X
{
template<typename U>
X(U&&) { };
};
}
template<typename T> X(T) -> X<T>;
I believe this is invalid and should be rejected.
If I'm wrong, then the deduction guide should be used by:
X obj(1);
but it fails to deduce the template argument.