Boost logo

Boost Users :

Subject: Re: [Boost-users] [smart_ptr] Multiple inheritance problem with smart pointer
From: Nathan Crookston (nathan.crookston_at_[hidden])
Date: 2010-11-21 01:24:30


Hi José,

2010/11/20 José Augusto Jr. <jamajbr_at_[hidden]>:
>    DataGrid->SetTable(m_myTimeSeries ,false);  => the m_myTimeSeries,
> whis is a smart pointer to the TimeSeriesClass, doesn't know that
> TimeSeriesClass is also wxGridTableBase child?

It looks like you're expecting an implicit conversion from shared_ptr
to the underlying pointer type. For various good reasons this isn't
an implicit operation -- use the get() method to obtain the underlying
pointer:

DataGrid->SetTable(m_myTimeSeries.get(), false);

HTH,

Nate


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net