Boost logo

Boost :

From: Steven Kirk (steven.kirk_at_[hidden])
Date: 2001-11-22 04:55:23


Doug,

Just a small change is required in the signals/slots library to work around
a strange bug in Borland C++. In make_slot_call_iterator
(slot_call_iterator.hpp), borland seems to discard the return value from
make_skip_if_iterator and complains that it can't construct a sc_iterator
from "undefined". To fix this, I took the logic from make_skip_if_iterator
and placed it directly into make_slot_call_iterator, you may wish to place
the borland-specific parts in #ifdefs, because AFAICT, this is just a bug in
borland.

The borland-compatible version now looks like this:

      template<typename Function, typename Iterator>
      inline typename slot_call_iterator_generator<Function, Iterator>::type
      make_slot_call_iterator(Iterator first, Iterator last, const Function&
f)
      {
        typedef slot_call_iterator_generator<Function, Iterator>
sci_generator;
        typedef typename sci_generator::skip_disconnected_iterator
          skip_iterator;
        typedef typename sci_generator::call_connected_slots_iterator
          call_iterator;
        typedef typename sci_generator::type sc_iterator;
        typedef skip_if_policy<is_disconnected, Iterator> policy;

        return sc_iterator(call_iterator(
            skip_iterator(first, policy(last, is_disconnected())), f));
      }

All of the tests now pass except for bindable_test.cpp, which I assume
relies on the latest CVS version of the bind library? I only have the latest
1.25.1 release at the moment. I will get un update from the CVS shortly and
try this final test.

Cheers,
Steven


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk