Question

Because libeigen does special work to adjust the memory alignment of all of its types, it has a special rule that says that in passing eigen types as arguments that they should always be pass-by-reference.

However I believe boost::bind implicitly passes by value.

My intuition is that using boost::bind with eigen types (and without using boost:ref) would violate Eigen's pass-by-reference rule, and thus cause problems.

Can anyone confirm this?

Was it helpful?

Solution

boost::bind will effectively pass arguments as values. Unless you wrap them with boost::(c)ref, then it would be just the wrapper which gets passed by value.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top