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

add explicit cast function #49

Open
HannesSommer opened this issue Aug 12, 2014 · 1 comment
Open

add explicit cast function #49

HannesSommer opened this issue Aug 12, 2014 · 1 comment

Comments

@HannesSommer
Copy link
Contributor

From Paul's email:

Hi all,
I think we shouldn't allow implicit casting in Kindr. The current implementation does things wrong (in my opinion) because:

C * C ==> C
C * C ==> C

Introducing explicit casting would deal with this in a nice way without having to solve the hard problems with lots and lots of template code. The above should generate a compiler error. We would need

C.cast() * C() ==> C

Sorry for the non-C++ pseudocode but I think you all know what I mean.

Best,

@HannesSommer
Copy link
Contributor Author

I agree on that. We could have automatic casting to the bigger types but that is probably not worth the effort and can even be confusing sometimes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant