Skip to content

[cpp2util] as: add constexpr branch for optionals #1062

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

Closed
wants to merge 1 commit into from

Conversation

sookach
Copy link
Contributor

@sookach sookach commented May 9, 2024

Aims to resolve #1061. This issue is very similar to #1057, where the as for optionals is defined after the general function. @hsutter @filipsajdak Would definitely like to hear some feedback/suggestions for how to handle this bug. My solution was to add a 'type trait' for checking if a type is an optional, but I'm not sure if this fits into cpp2's design philosophy. @bluetarpmedia I tested this on macos with clang18, let me know if this fix works for you. Thanks everyone!

@sookach sookach closed this May 15, 2024
@sookach sookach deleted the pr/1061 branch May 15, 2024 23:41
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.

[BUG] Cannot use as with std::optional in inspect expression
1 participant