C++ Logo

sg15

Advanced search

Re: [isocpp-ext] unqualified-ids looked up by the compiler

From: Kirk Shoop <kirk.shoop_at_[hidden]>
Date: Fri, 6 May 2022 15:55:05 -0700
Should await_transform be on that list?

On Fri, May 6, 2022 at 12:23 PM Timur Doumler via Ext <ext_at_[hidden]>
wrote:

> In the context of coroutines, there are some user-defined functions that
> will be looked up and called by the compiler in certain circumstances. For
> the promise type, I am currently counting the following eight:
>
> get_return_object
> get_return_object_on_allocation_failure
> initial_suspend
> final_suspend
> unhandled_exception
> return_void
> return_value
> yield_value
>
> These need special treatment by dev tools (IDEs, static analysers) to not
> be marked as “unused functions” because even if the dev tool sees that the
> user code never calls them, the compiler still might.
>
> Are there any other unqualified-ids apart from the eight above in the C++
> standard (in the context of coroutines or otherwise) that need this special
> treatment?
>
> Cheers,
> Timur
> _______________________________________________
> Ext mailing list
> Ext_at_[hidden]
> Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/ext
> Link to this post: http://lists.isocpp.org/ext/2022/05/19266.php
>

Received on 2022-05-06 22:55:17