Skip to content

Enhancement: Use exception_ptr_cast instead of throwing and catching hresult_canceled #27

Description

@YexuanXiao

C++26 introduced a new function template, exception_ptr_cast, to check whether an exception_ptr stores a given known type, which is typically faster than throwing and catching. The relevant code is in base_coroutine_foundation.h.

Currently, this function template has not been implemented yet. Once a implements supports it, this improvement can be implemented. The value of the feature test macro __cpp_lib_exception_ptr_cast is 202506L.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAdjust existing featuresfeatureNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions