Date: Fri, 6 May 2022 13:23:13 -0600
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
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
Received on 2022-05-06 19:23:17