| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The current implementation for std::any, std::optional, and std::variant throws exceptions. This behaviour is inconsistent to runtime checked as() for signed/unsigned integral cast. This implementation allows to setup one approch for type_safety issues. Current behaviour is to terminate but it can be changed to e.g. throwing exception.
|
Hi! Just checking in as I clean up the PRs with the relicensing (see #1322), is still intended to be still a draft PR? If so perhaps I'll close it for now and you can reopen this or a new PR once it's ready to look at? As described in #1322, this didn't make release 0.8, so I will need a new one-time CLA that will cover all your future contributions. I've emailed you the new CLA, and one it's completed I can look at PRs. |
Sorry, something went wrong.
|
Hi! I haven't heard back so I'll just close this for now, but please reopen or replace with a new PR if you pick this up again. Thanks Filip! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The current implementation of as() for std::any, std::optional, and std::variant throws exceptions in case of tunability to cast. This behavior is inconsistent with runtime checked as() for signed/unsigned integral cast where it calls terminate().
This implementation switch runtime checked as() to use type_safety, which allows the setup of one approach for all type_safety issues.
The current behavior is to terminate, but it can be changed, e.g., to throw an exception. The following example is an excellent example of how it can be used.
and the result is the following: