Skip to content
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

Question about underlying value access/casting #286

Open
yzsolt opened this issue Mar 30, 2022 · 0 comments
Open

Question about underlying value access/casting #286

yzsolt opened this issue Mar 30, 2022 · 0 comments

Comments

@yzsolt
Copy link

yzsolt commented Mar 30, 2022

The README mentions unit_t::to<T> and unit_cast<T> for accessing the underlying value as T. However the implementation of these seem to be using static_cast<T> internally, and (due to an unit_t::operator T() I guess?) it works externally too.

Is using static_cast for accessing the underlying value considered non-idiomatic? Are there any pitfalls I should be aware of when using static_cast?

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

No branches or pull requests

1 participant