Hi, Herb Sutter [1] recommends getting rid of unused variable warnings via the template template<class T> void unused_variable(const T&) {} He recommends against Eigen's practice of casting to void. Maybe it would make sense to change EIGEN_UNUSED_VARIABLE? Besides, one macro less is one macro less... Marton [1] http://herbsutter.com/2009/10/18/mailbag-shutting-up-compiler-warnings/
This also fixed a weird issue with clang optimizing a function call. https://bitbucket.org/eigen/eigen/commits/a7374a9a62b7/ Changeset: a7374a9a62b7 User: ggael Date: 2014-02-24 18:13:49 Summary: Implement bug 317: use a template function call to suppress unused variable warnings. This also fix the issue of the previous changeset in a much nicer way. https://bitbucket.org/eigen/eigen/commits/7662ce6119c5/ Changeset: 7662ce6119c5 Branch: 3.2 User: ggael Date: 2014-02-24 18:18:52 Summary: Implement bug 317: use a template function call to suppress unused variable warnings.
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/317.