Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-08-27 09:16:58


On Tuesday 27 August 2002 09:54 am, Peter Dimov wrote:
> > I needed the ability to determine if a type 'T' is a pointer or smart
>
> pointer
>
> > in Signals, and this helper is needed to create the is_pointerlike trait
> > check. Changes committed to CVS; no regressions AFAICT.
>
> Also, get_pointer for weak_ptr was deliberately omitted as dangerous. Why
> do you need it?

  void bar(weak_ptr<X> x)
  {
    some_signal.connect(bind(&X::foo, x));
  }

We need to get to the X* for the base-pointer conversion to trackable* (for
the automatic signal/slot disconnections). I guess it wouldn't be terribly
horrible if the Signals library just relied on forward declarations and
.get() to elimate the dependencies and not introduce the dependency on
type_traits/ice.hpp, if that would be preferable.

        Doug


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