Re: [Patch] RFQ: ParagraphList Rewrite

2006-02-15 Thread Lars Gullik Bjønnes
Abdelrazak Younes <[EMAIL PROTECTED]> writes: | > IMHO let people use | > std::for_each, at least you would have to change the api so that | > functors are usable. | | True... It works for only one kind of functor (void func(T&)). I just | wanted to hear opinion on that. The reason I have introdu

Re: [Patch] RFQ: ParagraphList Rewrite

2006-02-15 Thread Abdelrazak Younes
Lars Gullik Bjønnes a écrit : Abdelrazak Younes <[EMAIL PROTECTED]> writes: | > Having said that, I don't suppose that I'd lose too much sleep if | > the foreach declaration remained in it_vector.h but I'd be less happy | > to see it remain as an it_vector member function. | | Let's wait if any

Re: [Patch] RFQ: ParagraphList Rewrite

2006-02-15 Thread Lars Gullik Bjønnes
Abdelrazak Younes <[EMAIL PROTECTED]> writes: | > Having said that, I don't suppose that I'd lose too much sleep if | > the foreach declaration remained in it_vector.h but I'd be less happy | > to see it remain as an it_vector member function. | | Let's wait if anybody else has an opinion on that

Re: [Patch] RFQ: ParagraphList Rewrite

2006-02-15 Thread Abdelrazak Younes
Angus Leeming a écrit : Abdelrazak Younes <[EMAIL PROTECTED]> writes: [...] Having thought about it some more, I realise that I'm actually perfectly happy with it_vector::iterator it1 = ...; int pos = ...; it_vector::iterator it2 = it1 + pos; However, I'm surprised that operator+ t

Re: [Patch] RFQ: ParagraphList Rewrite

2006-02-15 Thread Angus Leeming
Abdelrazak Younes <[EMAIL PROTECTED]> writes: > Angus Leeming a écrit : > > So, operator+ advances the iterator but operator- tells you how > > far it would go but does nothing? That doesn't seem right. > > Can you explain the rationale? > vector::iterator has these operators which does essential

Re: [Patch] RFQ: ParagraphList Rewrite (possible hidden bug in export to latex)

2006-02-15 Thread Abdelrazak Younes
Hello, For those interested, here is a second version of the it_vector class. With former one an assertion is triggered whenever you try to export to latex. It seems that the at() method is used beyond the size() limit. I am really not sure but there is maybe a hidden bug somewhere in the "ex

Re: [Patch] RFQ: ParagraphList Rewrite

2006-02-15 Thread Abdelrazak Younes
Angus Leeming a écrit : [...] So, operator+ advances the iterator but operator- tells you how far it would go but does nothing? That doesn't seem right. Can you explain the rationale? vector::iterator has these operators which does essentially that (advance) and distance but list::iterator doe

Re: [Patch] RFQ: ParagraphList Rewrite

2006-02-14 Thread Angus Leeming
Abdelrazak Younes <[EMAIL PROTECTED]> writes: > I haven't contributed anything yet but I of course agree to license any > contributions that I make to LyX under the Gnu General Public License, > version 2 or later. Thanks. Angus

Re: [Patch] RFQ: ParagraphList Rewrite

2006-02-14 Thread Angus Leeming
Here follows a quick review... Abdelrazak Younes <[EMAIL PROTECTED]> writes: > template > class it_vector > { > class iterator: public Container::iterator > { > public: So, operator+ advances the iterator but operator- tells you how far it would go but does nothing? That doesn'

Re: [Patch] RFQ: ParagraphList Rewrite

2006-02-14 Thread Abdelrazak Younes
Angus Leeming a écrit : Abdel, have you posted a message to this list to say that you agree to license any contributions that you make to LyX under the Gnu General Public License, version 2 or later? If not, please do so. I haven't contributed anything yet but I of course agree to license any

Re: [Patch] RFQ: ParagraphList Rewrite

2006-02-14 Thread Angus Leeming
Abdelrazak Younes <[EMAIL PROTECTED]> writes: > Please find attached to this mail my refined patch for the ParagraphList > rewrite problem. This patch makes "ParagraphList" derive from > "it_vector >" Abdel, have you posted a message to this list to say that you agree to license any contribution

[Patch] RFQ: ParagraphList Rewrite

2006-02-14 Thread Abdelrazak Younes
Dear lyx developers, Please find attached to this mail my refined patch for the ParagraphList rewrite problem. This patch makes "ParagraphList" derive from "it_vector >" "it_vector" is a new template class that implement the vector alike container. It is defined in "it_vector.h". I don't know