Registered Member
|
Hi all,
When reading the Eigen documentation is says to not use the auto keyword for Eigen types, does this apply to AutoDiff as well? For example, I like to split up my inputs to get a better feel for what it is (when using AutoDiffJacobian):
Now this compiles and runs just fine, but I am wondering if I might be laying the ground for problems in the future? Is there a reason to stay away from auto here? |
Moderator
|
As long as you know what is the underlying type of your auto variable and that they don't hide reference to dead objects, then go ahead with auto.
We discourage the use of auto because many users when writing: auto C = A*B; expect C to be a Matrix object whereas it is an abstract expression. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]