|Re: [eigen] gcc 7.1 fails to build projects that depend on libeigen|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
Thanks! That helps a lot.
Now compilation fails at
h:186:26: error: enum constant in boolean context [-Werror=int-in-bool-
| const Index offset1 = (FirstAligned && alignmentStep==1)?3:1;
h:187:26: error: enum constant in boolean context [-Werror=int-in-bool-
| const Index offset3 = (FirstAligned && alignmentStep==1)?1:3;
IIUC FirstAligned is a constant always equal to 2. Isn't this first AND
operand redundant then?
On Mon, 2017-06-26 at 10:55 +0200, Gael Guennebaud wrote:
> ah, nevermind, I initially thought it complained about any usage of
> enums as boolean, but that's only the case if the enum value is not 0
> or 1, so here is the fix:
> On Sun, Jun 25, 2017 at 9:55 PM, Gael Guennebaud <gael.guennebaud@gma
> il.com> wrote:
> > Hi,
> > sorry for late replay, but that's not as easy as replacing them by
> > static const bool, see for instance this old thread: http://eigen.t
> > uxfamily.narkive.com/GatL7TiX/proposal-to-use-static-const-integer-
> > class-members-instead-of-enum-values
> > So the current workaround is to disable this warning: -Wno-int-in-
> > bool-context.
> > gael
> > On Fri, Jun 16, 2017 at 3:25 PM, Dmitry Rozhkov <dmitry.rozhkov@lin
> > ux.intel.com> wrote:
> > > Hi,
> > >
> > > The latest gcc seems to have problems with traits based on enum.
> > > Please
> > > find in the attachment a typical build log (for sophus in this
> > > case).
> > >
> > > What's the plan for them? Can we replace them with `static const
> > > bool`
> > > rather than `enum`?
> > >
> > > BR,
> > > Dmitry
> > >