← Back to team overview

dolfin team mailing list archive

Re: Use of explicit

 

Yeah I fixed my code.  It just seems odd that we allow it in some
places but not others. (For example in Mesh.h)

-- Andy

On Fri, Jun 27, 2008 at 1:20 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> On Thu, Jun 26, 2008 at 02:55:30PM +0200, Andy Ray Terrel wrote:
>> You probably don't need the explicit keyword for copy constructors as
>> done in Functions.h , PetscMatrix.h, uBlasMatrix.h, EpetraMatrix.h.
>> This has the added effect of not being able to pass functions as
>> arguments (perhaps that is bad but anyhow).  Having just pulled this
>> seemed to make my code a bit unhappy.
>
> You should not need to have a copy constructor to pass a Function as
> argument (at least by reference or as a pointer). Or are you passing
> it by value? That's probably not a good idea since it would involve
> copying the entire mesh as well as the vector of dofs.
>
> --
> Anders
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFIZM0UTuwUCDsYZdERAnmCAJ4uXwUvRti34CJ5qnaaaH/22b/qdwCghNAW
> NkOv+vhUhje3nzFc9CbpehM=
> =M3VM
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>
>


Follow ups

References