public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109763] New: GCC accepts invalid program involving decltype(classtype::memberfunction) when used with concepts
@ 2023-05-07  4:16 jlame646 at gmail dot com
  2023-05-07  4:28 ` [Bug c++/109763] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jlame646 at gmail dot com @ 2023-05-07  4:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109763
           Summary: GCC accepts invalid program involving
                    decltype(classtype::memberfunction) when used with
                    concepts
           Product: gcc
           Version: 13.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jlame646 at gmail dot com
  Target Milestone: ---

The following invalid program is accepted by gcc trunk.
https://godbolt.org/z/Ma67TTs5e

```
#include <iostream>
#include <type_traits> 
#include <concepts>
template < typename T >
concept test = std::same_as <decltype(T::func), int(int) >;
struct D
{
    int func(int);
};
int main()
{ 
    std::cout << test<D>;      
}
```
Note `decltype` on a non-static member function is not allowed and so it should
be ill-formed.

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

end of thread, other threads:[~2023-05-08  4:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-07  4:16 [Bug c++/109763] New: GCC accepts invalid program involving decltype(classtype::memberfunction) when used with concepts jlame646 at gmail dot com
2023-05-07  4:28 ` [Bug c++/109763] " pinskia at gcc dot gnu.org
2023-05-07  4:29 ` pinskia at gcc dot gnu.org
2023-05-07  4:31 ` pinskia at gcc dot gnu.org
2023-05-07  5:43 ` jlame646 at gmail dot com
2023-05-07  5:45 ` jlame646 at gmail dot com
2023-05-07  9:19 ` jlame646 at gmail dot com
2023-05-07 10:43 ` pinskia at gcc dot gnu.org
2023-05-07 10:45 ` pinskia at gcc dot gnu.org
2023-05-07 11:08 ` jlame646 at gmail dot com
2023-05-08  4:02 ` jlame646 at gmail dot com

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).