ParIterator::operator==

Richard Kimberly Heck rikiheck at lyx.org
Sun Nov 8 17:49:19 UTC 2020


On 11/8/20 3:57 AM, Yuriy Skalko wrote:
>> Isn't there a way with a xxx_cast too ? (maybe reinterpret_cast<> ?)
>>
>> JMarc
>
> Yes, here is another one with casting:
>
> bool operator==(ParConstIterator const & iter1, ParConstIterator const
> & iter2)
> {
>     return static_cast<DocIterator const &>(iter1) ==
> static_cast<DocIterator const &>(iter2);
> }

I'm happy to have someone commit a new version. Mostly, I was just
surprised by the comment. It seemed like there must be some way to
compare these as DocIterators without doing a copy. So it turns out
there are many!

Riki




More information about the lyx-devel mailing list