[Dune] Re: [Dune-CVS] dune-grid r2892 - trunk/grid/common

Thimo Neubauer thimo.neubauer at iwr.uni-heidelberg.de
Fri Jul 28 19:14:46 CEST 2006


On Thu, Jul 27, 2006 at 01:39:01PM +0200, Oliver Sander wrote:
> What is the problem?  All built-in C++ types act that way.

... which is the reason why constructors/destructors were
created... so that you don't have to search for hours until you find
the one uninitialized variable.

And even better: a good compiler will warn if you forget to initialize
a builtin type but not for the "undefined" EntityPointer.

Please design the class interfaces with the

  http://de.wikipedia.org/wiki/Principle_Of_Least_Surprise

i.e. either introduce a "NULL"-state (if you really want empty
EntityPointers) or remove the empty constructor.

Cheers
  Thimo




More information about the Dune mailing list