New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Bug 1273 - Assertions redefining
Summary: Assertions redefining
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 3.2
Hardware: All All
: Normal Documentation
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-12 09:08 UTC by Zdenko Bacik
Modified: 2016-08-12 13:36 UTC (History)
4 users (show)



Attachments

Description Zdenko Bacik 2016-08-12 09:08:38 UTC
Dear Eigen community,

I found a problem in documentation. I try to used assert redefining (see https://eigen.tuxfamily.org/dox-devel/TopicAssertions.html) and I got wrong results.

I am not going to write what happend there. Just see fix and you will see what is wrong (I added parentheses to if condition).

#include <stdexcept>
#undef eigen_assert
#define eigen_assert(x) \
  if (!(x)) { throw (std::runtime_error("Put your message here")); }
Comment 1 Christoph Hertzberg 2016-08-12 13:36:36 UTC
Thanks for noticing that!
Fixed in 3.2 and devel branch (online docu will be updated within the next day).

Note You need to log in before you can comment on or make changes to this bug.