Boost logo

Boost-Commit :

From: fmhess_at_[hidden]
Date: 2008-03-10 16:56:45


Author: fmhess
Date: 2008-03-10 16:56:44 EDT (Mon, 10 Mar 2008)
New Revision: 43556
URL: http://svn.boost.org/trac/boost/changeset/43556

Log:
Worked around bogus error when using g++ checked iterators.

Text files modified:
   sandbox/thread_safe_signals/boost/thread_safe_signals/detail/slot_groups.hpp | 7 +++++--
   1 files changed, 5 insertions(+), 2 deletions(-)

Modified: sandbox/thread_safe_signals/boost/thread_safe_signals/detail/slot_groups.hpp
==============================================================================
--- sandbox/thread_safe_signals/boost/thread_safe_signals/detail/slot_groups.hpp (original)
+++ sandbox/thread_safe_signals/boost/thread_safe_signals/detail/slot_groups.hpp 2008-03-10 16:56:44 EDT (Mon, 10 Mar 2008)
@@ -147,7 +147,7 @@
           if(_group_key_compare(arg2, arg1)) return false;
           return true;
         }
- void m_insert(map_iterator map_it, const group_key_type &key, const ValueType &value)
+ void m_insert(const map_iterator &map_it, const group_key_type &key, const ValueType &value)
         {
           iterator list_it = get_list_iterator(map_it);
           iterator new_it = _list.insert(list_it, value);
@@ -159,7 +159,10 @@
           if(lower_bound_it == _group_map.end() ||
             weakly_equivalent(lower_bound_it->first, key) == false)
           {
- _group_map[key] = new_it;
+ /* doing the following instead of just
+ _group_map[key] = new_it;
+ to avoid bogus error when enabling checked iterators with g++ */
+ _group_map.insert(typename map_type::value_type(key, new_it));
           }
         }
         iterator get_list_iterator(const map_iterator &map_it)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk