Skip to content

Commit 175dd5b

Browse files
yutakCommit bot
authored and
Commit bot
committed
C++11 style guide: Ban alignas/alignof for now.
This patch moves C++11 alignment features (alignas/alignof) to the banned language features section, since MSVS 2013 does not support them. MSVS 2015 seems to support them, so we can revisit once MSVS 2015 is rolled out. Discussion thread: https://groups.google.com/a/chromium.org/forum/#!msg/cxx/rwXN02jzzq0/CpUc1ZzMBQAJ BUG=none Review URL: https://codereview.chromium.org/1509123002 Cr-Commit-Position: refs/heads/master@{#363798}
1 parent 8dfb67a commit 175dd5b

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

styleguide/c++/c++11.html

+19-10
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,25 @@ <h3 id="blacklist_banned"><a name="core-blacklist"></a>C++11 Banned Features</h3
425425
<th style='width:240px;'>Notes</th>
426426
</tr>
427427

428+
<tr>
429+
<td>Alignment Features</td>
430+
<td>
431+
<code>alignas</code> specifier,
432+
<code>alignof</code> operator
433+
<td>Object alignment</td>
434+
<td>
435+
<a href="http://en.cppreference.com/w/cpp/language/alignas">alignas</a>,
436+
<a href="http://en.cppreference.com/w/cpp/language/alignof">alignof</a>
437+
</td>
438+
<td>
439+
<a href="https://codereview.chromium.org/1497963002/">Doesn't work in
440+
MSVS2013</a>.
441+
<a href="https://msdn.microsoft.com/en-us/library/dn956970.aspx">MSVS2015
442+
supports them</a>; reevaluate after MSVS2015 is available.
443+
<a href="https://groups.google.com/a/chromium.org/d/msg/cxx/rwXN02jzzq0/CpUc1ZzMBQAJ">Discussion thread</a>
444+
</td>
445+
</tr>
446+
428447
<tr>
429448
<td>Constant Expressions</td>
430449
<td><code>constexpr</code></td>
@@ -584,16 +603,6 @@ <h3 id="blacklist_review"><a name="core-review"></a>C++11 Features To Be Discuss
584603
<th style='width:240px;'>Notes</th>
585604
</tr>
586605

587-
<tr>
588-
<td>Alignment Features</td>
589-
<td>
590-
<code>alignas</code> specifier,
591-
<code>alignof</code> operator,
592-
<td>Object alignment</td>
593-
<td><a href="http://en.cppreference.com/w/cpp/language/alignof">alignof</a></td>
594-
<td></td>
595-
</tr>
596-
597606
<tr>
598607
<td>Attributes</td>
599608
<td><code>[[<i>attribute_name</i>]]</code></td>

0 commit comments

Comments
 (0)