This bugzilla service is closed. All entries have been migrated to
Bug 561 - AutoDiffScalar.h add #undef sign ?
Summary: AutoDiffScalar.h add #undef sign ?
Alias: None
Product: Eigen
Classification: Unclassified
Component: Unsupported modules (show other bugs)
Version: 3.2
Hardware: All All
: Normal Unknown
Assignee: Gael Guennebaud
Depends on:
Reported: 2013-03-07 17:22 UTC by Ralf Denzer
Modified: 2019-12-04 12:08 UTC (History)
2 users (show)


Description Ralf Denzer 2013-03-07 17:22:33 UTC

I propose to insert in the file 


a line 

#undef sign

after #define sign(x) is not anymore needed. This #define sign(x)
may conflict with a user definition of a sign(x) as it did in my

Maybe line 618 (after #undef EIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY)
would be a good place?


Comment 1 Christoph Hertzberg 2013-03-07 18:01:47 UTC
(In reply to comment #0)
> eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h

I actually don't see why this requires a #define at all. Either an inline function could be used or, as it is used only once, it could be expanded directly.
If for some technical reasons there must be a define then call it something like EIGEN_AUTODIFF_SIGN.
Comment 2 Gael Guennebaud 2013-03-07 23:37:28 UTC
I've no clue how this stupid macro got there.
changeset:   dca9a6c05154
user:        ggael
date:        2013-03-07 23:35:26
summary:     Fix bug 561: remove useless sign macro
Comment 3 Nobody 2019-12-04 12:08:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to'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:

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