Skip to content

zeus_expected: update to v1.3.1 #7640

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

Merged

Conversation

Willaaaaaaa
Copy link
Contributor

CI in #7533 has shown that the source code of this repo has an error like this:
image

It demonstrated that the compiler can't access a private variable by a friend function.
Although I am confused by this error, I fixed it with a patch.

@star-hengxing star-hengxing changed the base branch from autoupdate-zeus_expected-v1.3.0 to dev July 13, 2025 05:10
@star-hengxing star-hengxing reopened this Jul 13, 2025
@Willaaaaaaa
Copy link
Contributor Author

Thanks for the branch changing. completely forgot to check the target branch.

The error message in the previous CI indicated that the friend function operator== and != could NOT access the private member m_val within zeus::unexpected class.
In my opinion, this should not be an error. I don't understand whether it is a compiler bug or a repo author's bug, so I'm not sure if this is the best way to package. Please review it when you are free. Thanks!

The code in question: https://github.com/zeus-cpp/expected/blob/main/include/zeus/expected.hpp#L199-L211
To work around, I used this member function to get m_val: https://github.com/zeus-cpp/expected/blob/main/include/zeus/expected.hpp#L185

@star-hengxing
Copy link
Contributor

You can first report this error as an issue in the library repository.
After the original author fixes it, if they release a new version, we can ignore this version. If not, we can merge this patch.

@Willaaaaaaa
Copy link
Contributor Author

You can first report this error as an issue in the library repository. After the original author fixes it, if they release a new version, we can ignore this version. If not, we can merge this patch.

Sounds good. I'll open an issue with a reproducible example for the author asap.

@X1aomu
Copy link

X1aomu commented Jul 15, 2025

https://github.com/zeus-cpp/expected/releases/tag/v1.3.1

A fixed version was just released. Thanks for your work!

@Willaaaaaaa Willaaaaaaa changed the title zeus_expected: update to v1.3.0 zeus_expected: update to v1.3.1 Jul 15, 2025
@star-hengxing star-hengxing merged commit 78a5dc5 into xmake-io:dev Jul 15, 2025
73 checks passed
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.

5 participants