← Back to team overview

dolfin team mailing list archive

Re: Typemap for std:vector<boost::shared_ptr<Foo> >

 

On Wed, Mar 23, 2011 at 10:02:30AM -0700, Johan Hake wrote:
> On Wednesday March 23 2011 09:59:02 Anders Logg wrote:
> > On Wed, Mar 23, 2011 at 09:46:29AM -0700, Johan Hake wrote:
> > > On Wednesday March 23 2011 09:45:13 Anders Logg wrote:
> > > > On Wed, Mar 23, 2011 at 09:42:08AM -0700, Johan Hake wrote:
> > > > > Hi!
> > > > >
> > > > > I got a request to implement a typemap for
> > > > >
> > > > >   std:vector<boost::shared_ptr<Foo> >
> > > > >
> > > > > a while back.
> > > > >
> > > > > Should it be:
> > > > >   1)  std:vector<boost::shared_ptr<Foo> >&
> > > > >
> > > > > or
> > > > >
> > > > >   2)  std:vector<boost::shared_ptr<Foo> >
> > > > >
> > > > > I guess copying of shared_ptr aren't that costly. But we need to be
> > > > >
> > > > > consistent:
> > > > >   Form
> > > > >
> > > > > use the first version and
> > > > >
> > > > >   ErrorControl
> > > > >
> > > > > use the second version. I have no intention writing a typemap for
> > > > > both ;)
> > > >
> > > > I think (1) even if the copying is not costly. So it needs to be
> > > > changed in ErrorControl.
> > >
> > > No. It needs to be changed in Form.
> >
> > Why? Didn't you say that Form uses the first version?
>
> I did! But it should be the other way around *blush*

ok, I thought *I* was stupid for a little while. ;-)

--
Anders




References