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



Attachments

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

I propose to insert in the file 

eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h

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
case.

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

Bye

Ralf
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.

https://bitbucket.org/eigen/eigen/commits/dca9a6c05154/
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 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/561.

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