type_traits intrinsics design
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119775 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
995676a98e
commit
9835d76169
@ -158,6 +158,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="atomic_design.html"><tt><atomic></tt></a></li>
|
<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>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
236
www/type_traits_design.html
Normal file
236
www/type_traits_design.html
Normal file
@ -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>
|
Loading…
x
Reference in New Issue
Block a user