Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add is and as support for std::expected (v2) #971

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bluetarpmedia
Copy link
Contributor

@bluetarpmedia bluetarpmedia commented Feb 7, 2024

  • Update cpp2util.h to support is and as for std::expected
  • Add new pure2-expected-is-as regression test

This replaces the original PR #954; I couldn't successfully rebase it onto the updated changes in main so I gave up and created a new PR!

CC @filipsajdak

EDIT - The macOS build job is a spurious failure (not found for compiler: 'clang++'). I'm not sure why this happens but I've seen it a few times now. I don't have permission to retry the job in this repo, but in my own fork I just retry the job and it succeeds.

EDIT 2 - See PR #972 for the spurious macOS job failure

Copy link
Contributor

@JohelEGP JohelEGP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you may have accidentally moved the built-in as code section.

@filipsajdak
Copy link
Contributor

@bluetarpmedia i will take a look after a decision on how to implement is and as functions. #701 (comment)

Forward declare the `as` function templates for `std::expected` since they're not found by ADL
@bluetarpmedia
Copy link
Contributor Author

I think you may have accidentally moved the built-in as code section.

Thanks, restored now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants