diff options
author | vmpstr <vmpstr@chromium.org> | 2015-11-18 00:43:26 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-18 08:44:32 +0000 |
commit | c52317fc311d2193dc880f5b4ce09b30c8d90269 (patch) | |
tree | e8e2dd7e02e336f8a9c803d58dc6f04db0ec7c93 /styleguide | |
parent | 16ed819a212487e04e22fd6fae0e5c2542857f90 (diff) | |
download | chromium_src-c52317fc311d2193dc880f5b4ce09b30c8d90269.zip chromium_src-c52317fc311d2193dc880f5b4ce09b30c8d90269.tar.gz chromium_src-c52317fc311d2193dc880f5b4ce09b30c8d90269.tar.bz2 |
styleguide: Allow enable_if, conditional, and other type_traits.
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/1457673002
Cr-Commit-Position: refs/heads/master@{#360310}
Diffstat (limited to 'styleguide')
-rw-r--r-- | styleguide/c++/c++11.html | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/styleguide/c++/c++11.html b/styleguide/c++/c++11.html index 42cdc7a..a5565013 100644 --- a/styleguide/c++/c++11.html +++ b/styleguide/c++/c++11.html @@ -298,6 +298,26 @@ Parameter pack</a></td> <td>Note: std::move() is allowed but writing your own move constructors is still only allowed in exceptional cases for now, see 'Rvalue References (and Move Semantics)'. <a href='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/x_dWFxJFdbM'>Discussion thread</a></td> </tr> +<tr> +<td>Conditional Type Selection</td> +<td><code>std::enable_if</code> and <code>std::conditional</code></td> +<td>Enables compile-time conditional type selection</td> +<td><a href="http://en.cppreference.com/w/cpp/types/enable_if"> +std::enable_if</a> and +<a href="http://en.cppreference.com/w/cpp/types/conditional"> +conditional</a></td> +<td>Usage should be rare.<a href='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/vCxo4tZNd_M'>Discussion thread</a></td> +</tr> + +<tr> +<td>Type Traits</td> +<td>Class templates within <code><type_traits></code></td> +<td>Allows compile-time inspection of the properties of types</td> +<td><a href="http://en.cppreference.com/w/cpp/header/type_traits"> +Standard library header <type_traits></a></td> +<td>Note that not all type traits are available on all platforms (eg std::underlying_type doesn't work in libstdc++4.6). Use judiciously. <a href='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/vCxo4tZNd_M'>Discussion thread</a></td> +</tr> + </tbody> </table> @@ -676,17 +696,6 @@ the <code><complex></code> library.</td> </tr> <tr> -<td>Conditional Type Selection</td> -<td><code>std::enable_if</code> and <code>std::conditional</code></td> -<td>Enables compile-time conditional type selection</td> -<td><a href="http://en.cppreference.com/w/cpp/types/enable_if"> -std::enable_if</a> and -<a href="http://en.cppreference.com/w/cpp/types/conditional"> -conditional</a></td> -<td></td> -</tr> - -<tr> <td>Constant Iterator Methods on Containers</td> <td><code>std::cbegin()</code> and <code>std::cend()</code></td> <td>Enforces iteration methods that don't change container contents</td> @@ -966,15 +975,6 @@ within both associative and unordered containers</td> </tr> <tr> -<td>Type Traits</td> -<td>Class templates within <code><type_traits></code></td> -<td>Allows compile-time inspection of the properties of types</td> -<td><a href="http://en.cppreference.com/w/cpp/header/type_traits"> -Standard library header <type_traits></a></td> -<td></td> -</tr> - -<tr> <td>Unique Pointers</td> <td><code>std::unique_ptr<<i>type</i>></code></td> <td>Defines a pointer with clear and unambiguous ownership</td> |