http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47628

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-02-07 
17:03:01 UTC ---
btw, your analysis at
http://article.gmane.org/gmane.comp.lib.boost.devel/214412 is bogus

There is no C++99, presumably you mean C++98

C++0x mode is absolutely not the default mode of either g++ or libstdc++, I
don't know what gave you that idea.

The Boost.Signals code is ambiguous with or without C++0x mode enabled,
although there is an extra ambiguity with C++0x mode

I believe the underlying problem is that stored_group has a "catch all"
constructor, which means that the conversion from non-const iterator to
const_iterator is not better than the conversion from non-const iterator to
key_type (i.e. stored_group)

You should try this (untested) alternative fix, which should work for C++03 and
C++0x, and looks like an improvement anyway:

--- boost/signals/detail/named_slot_map.hpp.orig        2011-02-07
17:01:46.297942798 +0000
+++ boost/signals/detail/named_slot_map.hpp     2011-02-07 17:01:47.665572465
+0000
@@ -35,7 +35,7 @@
   stored_group(storage_kind kind = sk_empty) : kind(kind), group() { }

   template<typename T>
-  stored_group(const T& group) : kind(sk_group), group(new T(group)) { }
+  explicit stored_group(const T& group) : kind(sk_group), group(new T(group))
{ }

   bool is_front() const { return kind == sk_front; }
   bool is_back() const { return kind == sk_back; }

Reply via email to