On Monday, 17 August 2020 06.35.27 WEST Jürgen Spitzmüller wrote:
> Am Sonntag, den 16.08.2020, 21:26 +0100 schrieb José Abílio Matos:
> > What is wrong with
> >
> > pos_type ipos = min(cur.pos(), cell(i).size());
> >
> > it expresses intent better than the other code, no? :-)
>
> This was my first choice, too. However, it triggers:
>
> mathed/InsetMathGrid.cpp:1637:51: error: no matching function for call
> to ‘min(lyx::pos_type&, std::__cxx1998::vector<lyx::MathAtom,
> std::allocator<lyx::MathAtom> >::size_type)’
> 1637 | pos_type ipos = min(cur.pos(), cell(i).size());
>
>
> pos() is pos_type (signed), size() is size_t (unsigned)
>
> Jürgen
OK then what about
pos_type ipos = min(cur.pos(), pos_type(cell(i).size()));
--
José Abílio
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel