https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85763

            Bug ID: 85763
           Summary: Feature request: Add a suggestion when compilation
                    fails dues to ambiguous templated friend function
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: joshua.r.marshall.1991 at gmail dot com
  Target Milestone: ---

For friend functions with template parameters, it would be nice to have the
structure relation of typename'd values in a template declaration used for
function matching rather than what appears to be a more string literal
comparison or to throw a warning and suggestion when this is detected.  For
example, have the following functions match or throw a warning:


> class my_class{
> public:
>   template <typename _T>
>   friend void func(_T val);
> };
> 
> template <typename T>
> void func(T val)
> {
> ...
> }


It shows up as an ambiguous function definition, but one which seems very
help-able.

Reply via email to