https://bugs.llvm.org/show_bug.cgi?id=41253

            Bug ID: 41253
           Summary: Deleted non-template inline friend function in
                    template class causes redefinition error
           Product: clang
           Version: 8.0
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

The following code

  template <typename> struct C
  {
    friend void Func(C) = delete;
  };

  C<int> test;

generates the error 

  <source>:3:14: error: redefinition of 'Func'
    friend void Func(C) = delete;
                ^
  <source>:6:8: note: in instantiation of template class 'C<int>' requested
here
    C<int> test;
           ^
  <source>:3:14: note: previous definition is here
    friend void Func(C) = delete;


This might have the same cause as bug 35012, but bug 35012 already appeared in
Clang 5.0, while this bug appeared in Clang 7.0.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to