public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114564] New: Accessing template Base via template Derived fails
@ 2024-04-02 10:52 benni.buch at gmail dot com
  2024-04-02 14:50 ` [Bug c++/114564] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: benni.buch at gmail dot com @ 2024-04-02 10:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114564
           Summary: Accessing template Base via template Derived fails
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: benni.buch at gmail dot com
  Target Milestone: ---

```cpp
template <typename T>
struct Base {};

template <typename T>
struct Derived: Base<T> {
    Derived(Derived::Base obj);
};
```

Accessing Base via Derived works with clang and MSVC, but not with GCC.

Live:

- https://godbolt.org/z/Wv3EK3e71

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

* [Bug c++/114564] Accessing template Base via template Derived fails
  2024-04-02 10:52 [Bug c++/114564] New: Accessing template Base via template Derived fails benni.buch at gmail dot com
@ 2024-04-02 14:50 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-02 14:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |rejects-valid
      Known to fail|                            |4.1.2
   Last reconfirmed|                            |2024-04-02

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Simple workaround if needed is to place `typename` before `Derived::Base` . 
GCC is thinking `Derived::Base` is not a type for some reason ...

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

end of thread, other threads:[~2024-04-02 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02 10:52 [Bug c++/114564] New: Accessing template Base via template Derived fails benni.buch at gmail dot com
2024-04-02 14:50 ` [Bug c++/114564] " 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).