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.

Reply via email to