public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97297] New: typename wrongly required in out-of-class member function definitions
@ 2020-10-05 19:56 mpolacek at gcc dot gnu.org
  2020-10-05 19:56 ` [Bug c++/97297] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-10-05 19:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97297
           Summary: typename wrongly required in out-of-class member
                    function definitions
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

This should compile with -std=c++20 due to P0634R3:

template <typename T>
struct S {
    int simple(T::type);

    template <typename U>
    int member(U::type);
};

template <typename T>
int S<T>::simple(T::type) { // we still wrongly require 'typename' here...
    return 1;
}

template <typename T>
template <typename U>
int S<T>::member(U::type) { // ...and here
    return 2;
}

[temp.res]/5.2.4 covers the out-of-class member function definitions.

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

end of thread, other threads:[~2020-10-06 21:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05 19:56 [Bug c++/97297] New: typename wrongly required in out-of-class member function definitions mpolacek at gcc dot gnu.org
2020-10-05 19:56 ` [Bug c++/97297] " mpolacek at gcc dot gnu.org
2020-10-05 23:08 ` mpolacek at gcc dot gnu.org
2020-10-06 21:38 ` cvs-commit at gcc dot gnu.org
2020-10-06 21:39 ` mpolacek 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).