public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102881] New: gcc totally broken when trailing return type combine with decltype lambda
@ 2021-10-21 13:56 hewillk at gmail dot com
  2021-10-21 14:41 ` [Bug c++/102881] " hewillk at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: hewillk at gmail dot com @ 2021-10-21 13:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102881
           Summary: gcc totally broken when trailing return type combine
                    with decltype lambda
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

template<int N>
using R = decltype([] { return 0; }());

template <int N>
auto you_can_see_me() -> R<N> {
  return {};
}

int main() {
  you_can_see_me<0>();
}

GCC rejects with:

<source>:10:3: error: 'you_can_see_me' was not declared in this scope
   10 |   you_can_see_me<0>();
      |   ^~~~~~~~~~~~~~~~~

https://godbolt.org/z/7WEsjjscT

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

end of thread, other threads:[~2024-04-13  7:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 13:56 [Bug c++/102881] New: gcc totally broken when trailing return type combine with decltype lambda hewillk at gmail dot com
2021-10-21 14:41 ` [Bug c++/102881] " hewillk at gmail dot com
2021-10-22  9:07 ` vanyacpp at gmail dot com
2021-12-01 22:05 ` cvs-commit at gcc dot gnu.org
2021-12-01 22:55 ` ubizjak at gmail dot com
2021-12-02 12:46 ` jakub at gcc dot gnu.org
2024-04-13  7:57 ` 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).