public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105967] New: Forming a pointer to ref-qualified member function using a function typedef ignores the qualifier
@ 2022-06-14  7:25 iamsupermouse at mail dot ru
  2022-06-14  7:36 ` [Bug c++/105967] " pinskia at gcc dot gnu.org
  2022-06-14  7:38 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: iamsupermouse at mail dot ru @ 2022-06-14  7:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105967
           Summary: Forming a pointer to ref-qualified member function
                    using a function typedef ignores the qualifier
           Product: gcc
           Version: 12.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamsupermouse at mail dot ru
  Target Milestone: ---

Consider following code:

    #include <type_traits>

    struct A {};
    using F = void() &; 
    static_assert(std::is_same_v<F A::*, void(A::*)() &>);

GCC fails the static_assert, while Clang and MSVC accept it.

Apparently `F A::*` becomes `void(A::*)()`, without `&`. Same happens for `&&`.

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

end of thread, other threads:[~2022-06-14  7:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-14  7:25 [Bug c++/105967] New: Forming a pointer to ref-qualified member function using a function typedef ignores the qualifier iamsupermouse at mail dot ru
2022-06-14  7:36 ` [Bug c++/105967] " pinskia at gcc dot gnu.org
2022-06-14  7:38 ` 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).