public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104204] New: Ambiguity error for out of class definition of member function template in the presence of a member function of the same name
@ 2022-01-24 14:42 fchelnokov at gmail dot com
  2022-01-24 18:19 ` [Bug c++/104204] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: fchelnokov at gmail dot com @ 2022-01-24 14:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104204
           Summary: Ambiguity error for out of class definition of member
                    function template in the presence of a member function
                    of the same name
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

This code is accepted by other compilers:
```
template<typename T>
struct A {
    void f();
    template<typename U>
    void f();
};

template<>
template<typename U>
void A<double>::f() { }
```
but GCC complains:
```
error: ambiguous template specialization 'f<>' for 'void A<double>::f()'
```
Demo: https://gcc.godbolt.org/z/sfP5Kzr7Y

Related discussion: https://stackoverflow.com/q/56362063/7325599

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/104204] Ambiguity error for out of class definition of member function template in the presence of a member function of the same name
  2022-01-24 14:42 [Bug c++/104204] New: Ambiguity error for out of class definition of member function template in the presence of a member function of the same name fchelnokov at gmail dot com
@ 2022-01-24 18:19 ` pinskia at gcc dot gnu.org
  2022-01-24 18:54 ` fchelnokov at gmail dot com
  2022-01-24 19:14 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-24 18:19 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 39270.

*** This bug has been marked as a duplicate of bug 39270 ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/104204] Ambiguity error for out of class definition of member function template in the presence of a member function of the same name
  2022-01-24 14:42 [Bug c++/104204] New: Ambiguity error for out of class definition of member function template in the presence of a member function of the same name fchelnokov at gmail dot com
  2022-01-24 18:19 ` [Bug c++/104204] " pinskia at gcc dot gnu.org
@ 2022-01-24 18:54 ` fchelnokov at gmail dot com
  2022-01-24 19:14 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: fchelnokov at gmail dot com @ 2022-01-24 18:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Fedor Chelnokov <fchelnokov at gmail dot com> ---
Are you sure that this is a duplicate? Bug 39270 is about explicit
instantiation that is erroneously reported by GCC as specialization. And this
bug is about rejection of real explicit specialization in special
circumstances.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/104204] Ambiguity error for out of class definition of member function template in the presence of a member function of the same name
  2022-01-24 14:42 [Bug c++/104204] New: Ambiguity error for out of class definition of member function template in the presence of a member function of the same name fchelnokov at gmail dot com
  2022-01-24 18:19 ` [Bug c++/104204] " pinskia at gcc dot gnu.org
  2022-01-24 18:54 ` fchelnokov at gmail dot com
@ 2022-01-24 19:14 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-24 19:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 64063 really. sorry about that.

*** This bug has been marked as a duplicate of bug 64063 ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-24 19:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 14:42 [Bug c++/104204] New: Ambiguity error for out of class definition of member function template in the presence of a member function of the same name fchelnokov at gmail dot com
2022-01-24 18:19 ` [Bug c++/104204] " pinskia at gcc dot gnu.org
2022-01-24 18:54 ` fchelnokov at gmail dot com
2022-01-24 19:14 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).