aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/PassingByValue.dox
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-02-04 09:44:44 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-02-04 09:44:44 +0000
commit44a527dfa50ce9c473cbf1f446b8b6f406d4bc91 (patch)
treea0f045d2a4c22a38e08e1b1d1ce0e17e630898c7 /doc/PassingByValue.dox
parentb0dd22cc7271523ba83d2bc8a85504b8445587b5 (diff)
* classify and sort the doxygen "related pages"
by tweaking the filename and adding 2 categories: Troubleshooting and Advanced * use the EXCLUDE_SYMBOLS to clean the class list (insteaded of a homemade bash script) * remove the broken "exemple list" * re-structure the unsupported directory as mentionned in the ML and integrate the doc as follow: - snippets of the unsupported directory are directly imported from the main snippets/CMakefile.txt (no need to duplicate code) - add a top level "Unsupported modules" group - unsupported modules have to defined their own sub group and nest it using \ingroup Unsupported_modules - then a pair of //@{ //@} will put everything in the submodule - this is just a proposal !
Diffstat (limited to 'doc/PassingByValue.dox')
-rw-r--r--doc/PassingByValue.dox40
1 files changed, 0 insertions, 40 deletions
diff --git a/doc/PassingByValue.dox b/doc/PassingByValue.dox
deleted file mode 100644
index 6eaf9ccb9..000000000
--- a/doc/PassingByValue.dox
+++ /dev/null
@@ -1,40 +0,0 @@
-namespace Eigen {
-
-/** \page PassingByValue Passing Eigen objects by value to functions
-
-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 FixedSizeVectorizable "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:
-
-\code
-void my_function(Eigen::Vector2d v);
-\endcode
-
-needs to be rewritten as follows, passing v by reference:
-
-\code
-void my_function(const Eigen::Vector2d& v);
-\endcode
-
-Likewise if you have a class having a Eigen object as member:
-
-\code
-struct Foo
-{
- Eigen::Vector2d v;
-};
-void my_function(Foo v);
-\endcode
-
-This function also needs to be rewritten like this:
-\code
-void my_function(const Foo& v);
-\endcode
-
-Note that on the other hand, there is no problem with functions that return objects by value.
-
-*/
-
-}