cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

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

Open bluetarpmedia opened this issue 1 year ago • 4 comments

  • 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

bluetarpmedia avatar Feb 07 '24 05:02 bluetarpmedia

@bluetarpmedia i will take a look after a decision on how to implement is and as functions. https://github.com/hsutter/cppfront/pull/701#issuecomment-1933012987

filipsajdak avatar Feb 07 '24 22:02 filipsajdak

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

Thanks, restored now!

bluetarpmedia avatar Feb 08 '24 02:02 bluetarpmedia