Re: [eigen] eigen3 migration |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
On 04/14/2011 03:04 PM, Konstantin Tokarev wrote:
>
>
> 14.04.2011, 16:54, "Jitse Niesen" <jitse@xxxxxxxxxxxxxxxxx>:
>> On Wed, 13 Apr 2011, Benjamin Schindler wrote:
>>
>>> Okay, after deleting millions of lines of code, I managed to reduce it
>>> to this:
>>>
>>> #define Success 0 /* everything's okay */
>>> #include <eigen3/Eigen/Core>
>>>
>>> And this define comes from X.h, so it's rather standard
>>
>> It's pretty annoying that X.h has this #define. But I guess not including
>> X.h is rather difficult.
>>
>> In Eigen3, Success is used as an enum constant to report that a
>> computation was successful. The enum is defined as
>>
>> enum ComputationInfo {
>> Success = 0,
>> NumericalIssue = 1,
>> NoConvergence = 2
>> };
>>
>> We could rename Success to say ComputationSuccess, but that would break
>> all user code that uses the Success constant. Perhaps an acceptable
>> compromise would be to rename as above and also make Success available as
>> an alternative name unless a Success macro already has been defined:
>>
>> enum ComputationInfo {
>> ComputationSuccess = 0,
>> #ifndef Success
>> Success = 0,
>> #endif
>> NumericalIssue = 1,
>> NoConvergence = 2
>> };
>>
>> Any opinions?
>
> Require including of X.h after eigen3/Eigen/Core
>
That doesn't fix it as any use of the enum will break, like
if(myComputation() == Success) // this is after including X.h