[Dune-devel] [Dune-Commit] dune-istl r1656 - trunk/dune/istl

Jö Fahlke jorrit at jorrit.de
Wed Jul 18 15:04:17 CEST 2012


Am Wed, 18. Jul 2012, 14:43:52 +0200 schrieb gruenich at dune-project.org:
> SeqOverlappingSchwarzAssembler is a struct, not a class.

I've seen some of these from different people lately.  Is there a particular
reason for this that I have overlooked?

AFAICT 'struct' and 'class' are interchangeable in most places.  The only
exception is in a struct/class definition, where the sole difference is the
default access rule for base classes and members.  To the best of my
knowledge, the following is completely legal:

  class SomeClass; // declaration
  struct SomeClass : // definition
    BaseClass1,
    BaseClass2
    //...
  {
    Type1 member1;
    Type2 member2;
    //...
  };

In particular for friend declarations in templates you sometimes don't know
whether the friend class has been defined with 'class' or 'struct'.

Regards,
Jö.

-- 
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884

featured product: Debian GNU/Linux - http://www.debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20120718/dbe75d0b/attachment.sig>


More information about the Dune-devel mailing list