-
Notifications
You must be signed in to change notification settings - Fork 101
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
Check the use of transformX instead of for_eachX #32
Comments
It works in principle but it is difficult to use with boost::units. The result type of the transform-operations has to be determined from the operation:
It would work with C++11 where one can use decltype. |
Hrm I would think there should be a way somewhere in boost units to obtain the result type of some unit-based operation. Maybe we could ask on the boost list? |
Yes, I guess this is possible. But then we have to introduce another layer determining the result type of any operation. |
Or units_operations? Maybe the cleaner way to handle this rare use-case, although it would break existing code - but if we switch to transform anyhow this might be acceptable. |
I think it would be a nice feature for the C++11 version of odeint. C++11 support decltype which is exactly what is needed here. |
so leave the switch to transform for the c++11 version? |
Yeah, I think this is the best idea. Switching to transform is a large change, which cannot easily be done in the trunk since it breaks existing code. |
Moved this issue in the feature wishlist in the wiki! |
Check, if transform can be used instead of for_each in all algebras.
This must necessarily result in a new version of odeint, since it will break existing code.
The text was updated successfully, but these errors were encountered: