You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by dl...@apache.org on 2014/10/14 18:08:33 UTC

svn commit: r1631807 [1/3] - in /mesos/site: publish/documentation/latest/mesos-c++-style-guide/index.html publish/documentation/mesos-c++-style-guide/index.html publish/sitemap.xml source/documentation/latest/mesos-c++-style-guide.md

Author: dlester
Date: Tue Oct 14 16:08:33 2014
New Revision: 1631807

URL: http://svn.apache.org/r1631807
Log:
Updates documentation pages by running rake update_docs.

Modified:
    mesos/site/publish/documentation/latest/mesos-c++-style-guide/index.html
    mesos/site/publish/documentation/mesos-c++-style-guide/index.html
    mesos/site/publish/sitemap.xml
    mesos/site/source/documentation/latest/mesos-c++-style-guide.md

Modified: mesos/site/publish/documentation/latest/mesos-c++-style-guide/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/latest/mesos-c%2B%2B-style-guide/index.html?rev=1631807&r1=1631806&r2=1631807&view=diff
==============================================================================
--- mesos/site/publish/documentation/latest/mesos-c++-style-guide/index.html (original)
+++ mesos/site/publish/documentation/latest/mesos-c++-style-guide/index.html Tue Oct 14 16:08:33 2014
@@ -127,7 +127,14 @@
 
 <ul>
 <li>We use <a href="http://en.wikipedia.org/wiki/CamelCase#Variations_and_synonyms">lowerCamelCase</a> for function names (Google uses mixed case for regular functions; and their accessors and mutators match the name of the variable).</li>
-<li>Leave spaces around overloaded operators.  e.g. <code>operator + (...);</code> rather than <code>operator+(...);</code></li>
+<li>Leave spaces around overloaded operators, e.g. <code>operator + (...);</code> rather than <code>operator+(...);</code></li>
+</ul>
+
+
+<h3>Namespace Names</h3>
+
+<ul>
+<li>We do not use namespace aliases.</li>
 </ul>
 
 
@@ -228,12 +235,33 @@ Try&lt;Duration&gt; failoverTimeout =
 
 <h2>C++11</h2>
 
-<p>We still support older compilers. The whitelist of supported C++11 features is:
-* Static assertions.
-* Multiple right angle brackets.
-* Type inference (<code>auto</code> and <code>decltype</code>).
-* Rvalue references.
-* Variadic templates.</p>
+<p>We still support older compilers. The whitelist of supported C++11 features is:</p>
+
+<ul>
+<li>Static assertions.</li>
+<li>Multiple right angle brackets.</li>
+<li>Type inference (<code>auto</code> and <code>decltype</code>). The main goal is to increase code readability. Here are several examples:</li>
+</ul>
+
+
+<pre>
+// 1: OK.
+const auto& i = values.find(keys.front());
+// Compare with
+const typename map::iterator& i = values.find(keys.front());
+
+// 2: Don't use.
+auto authorizer = LocalAuthorizer::create(acls);
+// Compare with
+Try<Owned<LocalAuthorizer>> authorizer = LocalAuthorizer::create();
+</pre>
+
+
+<ul>
+<li>Rvalue references.</li>
+<li>Variadic templates.</li>
+</ul>
+
 
 	</div>
 </div>

Modified: mesos/site/publish/documentation/mesos-c++-style-guide/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/mesos-c%2B%2B-style-guide/index.html?rev=1631807&r1=1631806&r2=1631807&view=diff
==============================================================================
--- mesos/site/publish/documentation/mesos-c++-style-guide/index.html (original)
+++ mesos/site/publish/documentation/mesos-c++-style-guide/index.html Tue Oct 14 16:08:33 2014
@@ -127,7 +127,14 @@
 
 <ul>
 <li>We use <a href="http://en.wikipedia.org/wiki/CamelCase#Variations_and_synonyms">lowerCamelCase</a> for function names (Google uses mixed case for regular functions; and their accessors and mutators match the name of the variable).</li>
-<li>Leave spaces around overloaded operators.  e.g. <code>operator + (...);</code> rather than <code>operator+(...);</code></li>
+<li>Leave spaces around overloaded operators, e.g. <code>operator + (...);</code> rather than <code>operator+(...);</code></li>
+</ul>
+
+
+<h3>Namespace Names</h3>
+
+<ul>
+<li>We do not use namespace aliases.</li>
 </ul>
 
 
@@ -228,12 +235,33 @@ Try&lt;Duration&gt; failoverTimeout =
 
 <h2>C++11</h2>
 
-<p>We still support older compilers. The whitelist of supported C++11 features is:
-* Static assertions.
-* Multiple right angle brackets.
-* Type inference (<code>auto</code> and <code>decltype</code>).
-* Rvalue references.
-* Variadic templates.</p>
+<p>We still support older compilers. The whitelist of supported C++11 features is:</p>
+
+<ul>
+<li>Static assertions.</li>
+<li>Multiple right angle brackets.</li>
+<li>Type inference (<code>auto</code> and <code>decltype</code>). The main goal is to increase code readability. Here are several examples:</li>
+</ul>
+
+
+<pre>
+// 1: OK.
+const auto& i = values.find(keys.front());
+// Compare with
+const typename map::iterator& i = values.find(keys.front());
+
+// 2: Don't use.
+auto authorizer = LocalAuthorizer::create(acls);
+// Compare with
+Try<Owned<LocalAuthorizer>> authorizer = LocalAuthorizer::create();
+</pre>
+
+
+<ul>
+<li>Rvalue references.</li>
+<li>Variadic templates.</li>
+</ul>
+
 
 	</div>
 </div>