From: David Wells <drwells@email.unc.edu>
Date: Fri, 20 Sep 2019 23:01:20 +0000 (-0400)
Subject: Clarify the state of C++11 member initialization.
X-Git-Tag: v9.2.0-rc1~1051^2
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec2495b660d827dca99e1d054832da19f4e14f2c;p=dealii.git

Clarify the state of C++11 member initialization.

We don't use it for non-constexpr initialization.
---

diff --git a/doc/doxygen/headers/coding_conventions.h b/doc/doxygen/headers/coding_conventions.h
index 08f09258df..7ff9a6661d 100644
--- a/doc/doxygen/headers/coding_conventions.h
+++ b/doc/doxygen/headers/coding_conventions.h
@@ -119,7 +119,36 @@ executable.
   then functions.
   <br>
   Exceptions shall be declared at the end of the public section
-  before the non-public sections start.</li>
+  before the non-public sections start.
+  <br>
+  We do not use the C++11-style class member initialization for member variables
+  that are neither <code>static const</code> nor <code>static constexpr</code>;
+  i.e., instead of
+@code
+  class Foo
+  {
+    int a = 42;
+    int *b = nullptr;
+  };
+@endcode
+  write
+@code
+  class Foo
+  {
+    Foo();
+
+    int a;
+    int *b;
+  };
+
+
+
+  inline Foo::Foo()
+  : a(42)
+  , b(nullptr)
+  {}
+@endcode
+  </li>
 
 <li> If a function has both input and output parameters, usually the
   input parameters shall precede the output parameters, unless there