On Thu, Aug 14, 2003 at 06:42:47PM +0000, Angus Leeming wrote:
> Andre Poenitz wrote:
> 
> > +        RowList::iterator getRowNearY(int & y,
> > +                ParagraphList::iterator & pit) const;
> 
> André, I have been busy at work getting to know the Boost Graph Library. 
> Instead of a function like the one above, it would use something like:
> 
>         boost::tuple<RowList::iterator, ParagraphList::iterator, int> const
>                 getRowNearY(int y) const;
> 
> Using it so:
>         RowList::iterator rit;
>         ParagraphList::iterator pit;
>         boost::tie(rit, pit, y) getRowNearY(y);
> 
> I find this results in extremely clear user code.

Tastes are different.

As you may have noticed 

 (a) I am not too big a fan of any boost in headers, not to speak of
     something as crucial as lyxtext.h and 

 (b) the y parameter used to be passed by ref already, so this is 
     no invention of mine.

I admit that I don't like the mix of return value and ref arg, but as I
said: not my doing, and if somebody introduces boost in lyxtext.h it
certainly won't be me.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)

Reply via email to