kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #08321
Re: About today bzr update
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 )
> {
> by
> 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)
Jean-Pierre,
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
commit.
(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.)
Thanks,
Dick
P.S.
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.
Follow ups
References