← Back to team overview

kicad-developers team mailing list archive

Re: About today bzr update


Le 16/05/2012 19:33, Dick Hollenbeck a écrit :
On 05/16/2012 06:28 AM, jp.charras wrote:
Le 16/05/2012 10:24, Lorenzo Marcantonio a écrit :
Merged from the tip. Problem of the day :P

You declared

typedef boost::ptr_vector<   LIB_ITEM>   LIB_ITEMS;

... which is an IMHO more than reasonable decision.

drawings in LIB_COMPONENT is a LIB_ITEMS.

Then in (for example) GetBoundingBox I have an issue on the

BOOST_FOREACH( const LIB_ITEM&   item, drawings )
An easy fix is to replace
      BOOST_FOREACH( const LIB_ITEM&   item, drawings )
      for( unsigned ii = 0; ii<  drawings.size(); ii++  )
          const LIB_ITEM&  item = drawings[ii];
in const functions.

For obscure reasons, in BOOST 1.49
      BOOST_FOREACH( const LIB_ITEM&   item, drawings )
has problems inside a const function,
and works fine when the function is not declared as const.

(at least for me with gcc 4.6.2)


Was commit 3563 the last of the new compile problems with 4.6.2?

I was in the process of installing gcc 4.6.2 in order to fix my breakage, when I saw your

(If all fixed, I can probably postpone that gcc install until I upgrade to newer Ubuntu in
the next 1 or 2 weeks.  4.6.2 seems to be commonly used now, and my Ubuntu Lucid system is
showing its whiskers.  Probably most of the bleeding on the new Ubuntu LTS is over now,
thinking safe to upgrade.)



This is the last commit (and, in fact the only one) about issues with gcc 4.6.2.
Because I tested some time ago boost 1.49 (I am using in in a special testing branch since it is out),
I was already aware of this issue.

This is the only one I found.

Currently I am using gcc 4.6.2 with mingw, and gcc 4.4 under Linux Ubuntu 10.10
Is is the first issue I had since I am using gcc 4.6.2. (end of year 2011)


The BOOST_FOREACH black box works well until it doesn't work, then you wish the box was
transparent.  This is why I never used it.  Besides, no way they can write those three
statements better than I can anyway.

I am also not fond of BOOST_FOREACH: it does not add clarity or efficiency in code.
I do not use it in my code.

Jean-Pierre CHARRAS

Follow ups