aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/PassingByValue.dox
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-12-11 22:45:32 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-12-11 22:45:32 +0100
commit57acb05eefec9f59dafc95fd386b3f6d81040962 (patch)
treec895a648fddcc794f030ff049ca92b0dfd1d5735 /doc/PassingByValue.dox
parent76fca221347339e210ba3a24d2739d8dd147c15c (diff)
Update and extend doc on alignment issues.
Diffstat (limited to 'doc/PassingByValue.dox')
-rw-r--r--doc/PassingByValue.dox8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/PassingByValue.dox b/doc/PassingByValue.dox
index bf4d0ef4b..9254fe6d8 100644
--- a/doc/PassingByValue.dox
+++ b/doc/PassingByValue.dox
@@ -4,21 +4,21 @@ namespace Eigen {
Passing objects by value is almost always a very bad idea in C++, as this means useless copies, and one should pass them by reference instead.
-With Eigen, this is even more important: passing \ref TopicFixedSizeVectorizable "fixed-size vectorizable Eigen objects" by value is not only inefficient, it can be illegal or make your program crash! And the reason is that these Eigen objects have alignment modifiers that aren't respected when they are passed by value.
+With %Eigen, this is even more important: passing \ref TopicFixedSizeVectorizable "fixed-size vectorizable Eigen objects" by value is not only inefficient, it can be illegal or make your program crash! And the reason is that these %Eigen objects have alignment modifiers that aren't respected when they are passed by value.
-So for example, a function like this, where v is passed by value:
+For example, a function like this, where \c v is passed by value:
\code
void my_function(Eigen::Vector2d v);
\endcode
-needs to be rewritten as follows, passing v by reference:
+needs to be rewritten as follows, passing \c v by const reference:
\code
void my_function(const Eigen::Vector2d& v);
\endcode
-Likewise if you have a class having a Eigen object as member:
+Likewise if you have a class having an %Eigen object as member:
\code
struct Foo