Boost logo

Boost :

Subject: Re: [boost] [signals] failure to build with recent gcc
From: Adam Butcher (dev.lists_at_[hidden])
Date: 2011-01-18 04:26:30

Hi Patrick,

On Mon, December 20, 2010 1:52 am, Patrick Horgan wrote:
> I get a number of the same failures when doing a clean build of boost
> trunk with a recent gcc (4.6.0).
> libs/signals/src/named_slot_map.cpp:105:23: instantiated from here
> error: call of overloaded erase(...[snip]...iterator&) is ambiguous
I hit this issue building boost 1.44.0 with gcc trunk last night. The
following patch works around the ambiguity by using const_group_iterator
instead of just group_iterator. Don't know if this is an issue with
boost or gcc but this got it building for me.

Note that I don't know about any performance or run-time issues this
patch may cause -- I just wanted to get it built.


--- boost_1_44_0/libs/signals/src/named_slot_map.cpp
+++ boost_1_44_0/libs/signals/src/named_slot_map.cpp
@@ -102,7 +102,7 @@
       i = next;
- groups.erase(group);
+ groups.erase(const_group_iterator(group));

@@ -125,7 +125,7 @@

     // Clear out empty groups
- if (empty(g)) groups.erase(g++);
+ if (empty(g)) groups.erase(const_group_iterator(g++));
     else ++g;

Boost list run by bdawes at, gregod at, cpdaniel at, john at