[cfe-commits] [libcxx] r119775 - in /libcxx/trunk/www: index.html type_traits_design.html

Howard Hinnant hhinnant at apple.com
Thu Nov 18 17:38:59 PST 2010


Author: hhinnant
Date: Thu Nov 18 19:38:58 2010
New Revision: 119775

URL: http://llvm.org/viewvc/llvm-project?rev=119775&view=rev
Log:
type_traits intrinsics design

Added:
    libcxx/trunk/www/type_traits_design.html
Modified:
    libcxx/trunk/www/index.html

Modified: libcxx/trunk/www/index.html
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/index.html?rev=119775&r1=119774&r2=119775&view=diff
==============================================================================
--- libcxx/trunk/www/index.html (original)
+++ libcxx/trunk/www/index.html Thu Nov 18 19:38:58 2010
@@ -158,6 +158,7 @@
 
 <ul>
 <li><a href="atomic_design.html"><tt><atomic></tt></a></li>
+<li><a href="type_traits_design.html"><tt><type_traits></tt></a></li>
 </ul>
 
 </div>

Added: libcxx/trunk/www/type_traits_design.html
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/type_traits_design.html?rev=119775&view=auto
==============================================================================
--- libcxx/trunk/www/type_traits_design.html (added)
+++ libcxx/trunk/www/type_traits_design.html Thu Nov 18 19:38:58 2010
@@ -0,0 +1,236 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+          "http://www.w3.org/TR/html4/strict.dtd">
+<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
+<html>
+<head>
+  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+  <title>type traits intrinsic design</title>
+  <link type="text/css" rel="stylesheet" href="menu.css">
+  <link type="text/css" rel="stylesheet" href="content.css">
+</head>
+
+<body>
+<div id="menu">
+  <div>
+    <a href="http://llvm.org/">LLVM Home</a>
+  </div>
+
+  <div class="submenu">
+    <label>libc++ Info</label>
+    <a href="/index.html">About</a>
+  </div>
+
+  <div class="submenu">
+    <label>Quick Links</label>
+    <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev</a>
+    <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits</a>
+    <a href="http://llvm.org/bugs/">Bug Reports</a>
+    <a href="http://llvm.org/svn/llvm-project/libcxx/trunk/">Browse SVN</a>
+    <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/">Browse ViewVC</a>
+  </div>
+</div>
+
+<div id="content">
+  <!--*********************************************************************-->
+  <h1>Type traits intrinsic design</h1>
+  <!--*********************************************************************-->
+
+<p>
+This is a survey of the type traits intrinsics clang has, and those needed.
+The names and definitions of several of the needed type traits has recently
+changed.  Please see:
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3142.html">N3142</a>.
+</p>
+
+<blockquote>
+<table border="1">
+<caption>Legend</caption>
+
+<tr>
+<td>clang supplies it and it is absolutely necessary</td>
+<td bgcolor="#80FF80"><tt>some_trait(T)</tt></td>
+</tr>
+
+<tr>
+<td>clang supplies it and it is useful</td>
+<td bgcolor="#96B9FF"><tt>some_trait(T)</tt></td>
+</tr>
+
+<tr>
+<td>clang supplies it and it is not needed</td>
+<td><tt>some_trait(T)</tt></td>
+</tr>
+
+<tr>
+<td>clang does not supply it and it is not needed</td>
+<td></td>
+</tr>
+
+<tr>
+<td>clang does not supply it and it is absolutely necessary</td>
+<td bgcolor="#FF5965"><tt>some_trait(T)</tt></td>
+</tr>
+
+</table>
+
+<p></p>
+
+<table border="1">
+<caption>Needed type traits vs clang type traits</caption>
+
+<tr>
+<th>libc++ Needs</th>
+<th>clang Has</th>
+</tr>
+
+<tr>
+<td><tt>is_union<T></tt></td>
+<td bgcolor="#80FF80"><tt>__is_union(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_class<T></tt></td>
+<td bgcolor="#96B9FF"><tt>__is_class(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_enum<T></tt></td>
+<td bgcolor="#96B9FF"><tt>__is_enum(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_pod<T></tt></td>
+<td bgcolor="#80FF80"><tt>__is_pod(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>has_virtual_destructor<T></tt></td>
+<td bgcolor="#80FF80"><tt>__has_virtual_destructor(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_constructible<T, Args...></tt></td>
+<td bgcolor="#FF5965"><tt>__is_constructible(T, Args...)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_default_constructible<T></tt></td>
+<td></td>
+</tr>
+
+<tr>
+<td><tt>is_copy_constructible<T></tt></td>
+<td></td>
+</tr>
+
+<tr>
+<td><tt>is_move_constructible<T></tt></td>
+<td></td>
+</tr>
+
+<tr>
+<td><tt>is_assignable<T, U></tt></td>
+<td bgcolor="#FF5965"><tt>__is_assignable(T, U)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_copy_assignable<T></tt></td>
+<td></td>
+</tr>
+
+<tr>
+<td><tt>is_move_assignable<T></tt></td>
+<td></td>
+</tr>
+
+<tr>
+<td><tt>is_destructible<T></tt></td>
+<td bgcolor="#FF5965"><tt>__is_destructible(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_trivially_constructible<T, Args...></tt></td>
+<td bgcolor="#FF5965"><tt>__is_trivially_constructible(T, Args...)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_trivially_default_constructible<T></tt></td>
+<td><tt>__has_trivial_constructor(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_trivially_copy_constructible<T></tt></td>
+<td><tt>__has_trivial_copy(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_trivially_move_constructible<T></tt></td>
+<td></td>
+</tr>
+
+<tr>
+<td><tt>is_trivially_assignable<T, U></tt></td>
+<td bgcolor="#FF5965"><tt>__is_trivially_assignable(T, U)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_trivially_copy_assignable<T></tt></td>
+<td><tt>__has_trivial_assign(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_trivially_move_assignable<T></tt></td>
+<td></td>
+</tr>
+
+<tr>
+<td><tt>is_trivially_destructible<T></tt></td>
+<td bgcolor="#80FF80"><tt>__has_trivial_destructor(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_nothrow_constructible<T, Args...></tt></td>
+<td bgcolor="#FF5965"><tt>__is_nothrow_constructible(T, Args...)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_nothrow_default_constructible<T></tt></td>
+<td><tt>__has_nothrow_constructor(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_nothrow_copy_constructible<T></tt></td>
+<td><tt>__has_nothrow_copy(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_nothrow_move_constructible<T></tt></td>
+<td></td>
+</tr>
+
+<tr>
+<td><tt>is_nothrow_assignable<T, U></tt></td>
+<td bgcolor="#FF5965"><tt>__is_nothrow_assignable(T, U)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_nothrow_copy_assignable<T></tt></td>
+<td><tt>__has_nothrow_assign(T)</tt></td>
+</tr>
+
+<tr>
+<td><tt>is_nothrow_move_assignable<T></tt></td>
+<td></td>
+</tr>
+
+<tr>
+<td><tt>is_nothrow_destructible<T></tt></td>
+<td bgcolor="#FF5965"><tt>__is_nothrow_destructible(T)</tt></td>
+</tr>
+
+</table>
+</blockquote>
+
+</div>
+</body>
+</html>





More information about the cfe-commits mailing list