Re: [eigen] eigen3 migration |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
Hi
On 04/14/2011 02:54 PM, Jitse Niesen wrote:
> 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.
Correct. Since we don't use this enum so far, I now included eigen
before GLee.h and this fixes the problem temporarily. But of course,
that's not a final solution
>
> 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?
I think that's a dangerous move as you can get different symbols in the
same compilation (i.e. one header has it, the other has not). I see no
other way than to forcibly rename it t.b.h.
>
>
> Jitse
>
>