+
+inline bool operator<(LyXParagraph::InsetTable const & a,
+ LyXParagraph::InsetTable const & b)
+{
+ return a.pos < b.pos;
+}
+
This one looks conceptually wrong.
When comparing two InsetTables you need to take pos into account.
Instead of using this operator< (I assume you add this because of
lowerbound) create an appropriate functor
struct compare_insettable_pos {
public:
inline bool operator()(LyXParagraph::InsetTable const & a,
LyXParagraph::InsetTable const & b) const
{
return a.pos < b.pos;
}
}
... = lowerbound(a, b, compare_insettable_pos());
[...]
btw. why a vector for InsetTable? I would thing that a list suited the
sorted/kept sorted sequence a lot better.
Lgb