-
Notifications
You must be signed in to change notification settings - Fork 219
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
using std::optional in favor of bool return #29
Conversation
I also tagged in a fix for a typo. Let me know if I need to open a new PR for that. |
This won't work. I had to remove std::optionall use elsewhere due to portability issues. |
Portability issues from where? |
I think @tomhog found issues with std::optional on either the Android port. The line of least resistance was simply to replace the std::optional usage. Could you generate a PR for the typo fix. Thanks. |
I'm closing this PR as it risks cross platform build. I have applied the typo fix: |
I know it's difficult with the speed at which you are prototyping, but is it possible to have a blurb somewhere about the different c++17 features that can't be used due to X reason? |
I have wondered about writing a C++ usage document, from the perspective of what bits of C++17 etc. are used where, but adding what parts don't currently work well across platforms would be a good addition too. I can't promise this right away but I'll continue thinking about it. |
Hi @sbrkopac So the issue at the moment is on macOS std::optional and std::any are currently in the std::experimental namespace (I'm assuming it'll be the same for iOS). So for now we've avoided them to prevent the code requiring conditional compilation in lots of places. Hopefully apply move these into the standard std namespace in the near future. |
Pull Request Template
Description
Utilizing std::optional rather than a bool check for returning a user value. This allows the library to transform code from:
Into its c++17 equivalent:
Type of change
Checklist: