public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/97561] New: coroutine_handle doesn't have inheritance
@ 2020-10-24 14:29 stinkingmadgod at gmail dot com
  2020-10-26 12:31 ` [Bug libstdc++/97561] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: stinkingmadgod at gmail dot com @ 2020-10-24 14:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97561
           Summary: coroutine_handle doesn't have inheritance
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stinkingmadgod at gmail dot com
  Target Milestone: ---

std::coroutine_handle<promise_type> doesn't inherit from
std::coroutine_handle<void>.

[coroutine.handle.general]
template<class Promise>
struct coroutine_handle : coroutine_handle<>

#include<coroutine>
struct task {
    struct promise_type {
        task get_return_object() { return {}; }
        std::suspend_never initial_suspend() { return {}; }
        std::suspend_never final_suspend() { return {}; }
        void return_void() {}
        void unhandled_exception() {}
    };
};

int main()
{
    std::coroutine_handle<task::promise_type> c;
    std::coroutine_handle<>& c2 = c;  // fails
}

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

end of thread, other threads:[~2020-10-26 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-24 14:29 [Bug libstdc++/97561] New: coroutine_handle doesn't have inheritance stinkingmadgod at gmail dot com
2020-10-26 12:31 ` [Bug libstdc++/97561] " redi at gcc dot gnu.org
2020-10-26 12:33 ` redi at gcc dot gnu.org
2020-10-26 17:15 ` stinkingmadgod 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).