Files
dl_old/document/html/dl__concept_8h_source.html
T
2026-03-03 16:12:17 +08:00

149 lines
18 KiB
HTML
Vendored

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.13.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>dl: dl/base/dl_concept.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">dl
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.13.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',false,false,'search.php','搜索',false);
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_17297ffb27ce571941f5fb5008f01a1f.html">dl</a></li><li class="navelem"><a class="el" href="dir_78beb56c8eba7ccc6c64d7863d88a69e.html">base</a></li> </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
<div class="headertitle"><div class="title">dl_concept.h</div></div>
</div><!--header-->
<div class="contents">
<a href="dl__concept_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &quot;<a class="code" href="dl__platform_8h.html">system/dl_platform.h</a>&quot;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#if (DL_PLATFORM == DL_PLATFORM_ANDROID)</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include &lt;concepts&gt;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include &quot;<a class="code" href="dl__platform_8h.html">system/dl_platform.h</a>&quot;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacedl.html">dl</a></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span>{</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#if (DL_PLATFORM != DL_PLATFORM_ANDROID)</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">//标准库为小写下划线命名,我们使用大写开头</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keyword">concept </span><a class="code hl_define" href="dl__concept_8h.html#a5a8fd66f3d4a5e6a4fe87c3e5fd3b52f">PopFrontAble</a> = <span class="keyword">requires</span>(<a class="code hl_enumvalue" href="namespacedl.html#a38a0162879cdbfbbe99ba16e7a170132ab9ece18c950afbfa6b0fdbfa4ff731d3">T</a> x) { x.pop_front(); };</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keyword">concept </span><a class="code hl_define" href="dl__concept_8h.html#ad9e40980cee7ba9349ac5a2f57a774d9">IsUnsigned</a> = std::is_unsigned&lt;T&gt;::value;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="keyword">concept </span><a class="code hl_define" href="dl__concept_8h.html#ab17af810219f1bceede4ed860c82c1d0">IsSigned</a> = std::is_signed&lt;T&gt;::value;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="keyword">concept </span><a class="code hl_define" href="dl__concept_8h.html#a2d7adf4030542dfbd0053acc9939f04d">IsInteger</a> = std::is_integral&lt;T&gt;::value;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="keyword">concept </span><a class="code hl_define" href="dl__concept_8h.html#a7762439da1bf04d0bed1010a735511f3">IsReal</a> = std::is_floating_point&lt;T&gt;::value;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="comment">//标准布局</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="keyword">concept </span><a class="code hl_define" href="dl__concept_8h.html#a4b6434ba1452b4e8a725b39b8c18194f">IsStandardLayout</a> = std::is_standard_layout&lt;T&gt;::value;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment">//平凡类型,比is_standard_layout严格</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="keyword">concept </span><a class="code hl_define" href="dl__concept_8h.html#a65f0c4d501aef37e7962b91e578a880c">IsTrivial</a> = std::is_trivial&lt;T&gt;::value;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment">//标准布局 与 平凡类型 的组合</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="keyword">concept </span><a class="code hl_define" href="dl__concept_8h.html#a6a4eeaf3b12c08feec3c35830657293f">IsPod</a> = std::is_pod&lt;T&gt;::value;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="keyword">concept </span><a class="code hl_define" href="dl__concept_8h.html#a743a4510f291e356fc67efa0b375d1e8">IsCopyable</a> = std::is_trivially_copyable&lt;T&gt;::value;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="keyword">concept </span><a class="code hl_define" href="dl__concept_8h.html#a6898cc5ffc1293611144612785308b0c">IsBase</a> = std::is_fundamental&lt;T&gt;::value;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="keyword">concept </span><a class="code hl_define" href="dl__concept_8h.html#add3178bdceee6213d83605422a6dfc41">IsPointer</a> = std::is_pointer&lt;T&gt;::value;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="dl__concept_8h.html#a5a8fd66f3d4a5e6a4fe87c3e5fd3b52f"> 64</a></span><span class="preprocessor">#define PopFrontAble typename</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="dl__concept_8h.html#ad9e40980cee7ba9349ac5a2f57a774d9"> 65</a></span><span class="preprocessor">#define IsUnsigned typename</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="dl__concept_8h.html#ab17af810219f1bceede4ed860c82c1d0"> 66</a></span><span class="preprocessor">#define IsSigned typename</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="dl__concept_8h.html#a2d7adf4030542dfbd0053acc9939f04d"> 67</a></span><span class="preprocessor">#define IsInteger typename</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="dl__concept_8h.html#a7762439da1bf04d0bed1010a735511f3"> 68</a></span><span class="preprocessor">#define IsReal typename</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="dl__concept_8h.html#a4b6434ba1452b4e8a725b39b8c18194f"> 69</a></span><span class="preprocessor">#define IsStandardLayout typename</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="dl__concept_8h.html#a65f0c4d501aef37e7962b91e578a880c"> 70</a></span><span class="preprocessor">#define IsTrivial typename</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="dl__concept_8h.html#a6a4eeaf3b12c08feec3c35830657293f"> 71</a></span><span class="preprocessor">#define IsPod typename</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="dl__concept_8h.html#a743a4510f291e356fc67efa0b375d1e8"> 72</a></span><span class="preprocessor">#define IsCopyable typename</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="dl__concept_8h.html#a6898cc5ffc1293611144612785308b0c"> 73</a></span><span class="preprocessor">#define IsBase typename</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="dl__concept_8h.html#add3178bdceee6213d83605422a6dfc41"> 74</a></span><span class="preprocessor">#define IsPointer typename</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span>}</div>
<div class="ttc" id="adl__concept_8h_html_a2d7adf4030542dfbd0053acc9939f04d"><div class="ttname"><a href="dl__concept_8h.html#a2d7adf4030542dfbd0053acc9939f04d">IsInteger</a></div><div class="ttdeci">#define IsInteger</div><div class="ttdef"><b>定义</b> <a href="#l00067">dl_concept.h:67</a></div></div>
<div class="ttc" id="adl__concept_8h_html_a4b6434ba1452b4e8a725b39b8c18194f"><div class="ttname"><a href="dl__concept_8h.html#a4b6434ba1452b4e8a725b39b8c18194f">IsStandardLayout</a></div><div class="ttdeci">#define IsStandardLayout</div><div class="ttdef"><b>定义</b> <a href="#l00069">dl_concept.h:69</a></div></div>
<div class="ttc" id="adl__concept_8h_html_a5a8fd66f3d4a5e6a4fe87c3e5fd3b52f"><div class="ttname"><a href="dl__concept_8h.html#a5a8fd66f3d4a5e6a4fe87c3e5fd3b52f">PopFrontAble</a></div><div class="ttdeci">#define PopFrontAble</div><div class="ttdef"><b>定义</b> <a href="#l00064">dl_concept.h:64</a></div></div>
<div class="ttc" id="adl__concept_8h_html_a65f0c4d501aef37e7962b91e578a880c"><div class="ttname"><a href="dl__concept_8h.html#a65f0c4d501aef37e7962b91e578a880c">IsTrivial</a></div><div class="ttdeci">#define IsTrivial</div><div class="ttdef"><b>定义</b> <a href="#l00070">dl_concept.h:70</a></div></div>
<div class="ttc" id="adl__concept_8h_html_a6898cc5ffc1293611144612785308b0c"><div class="ttname"><a href="dl__concept_8h.html#a6898cc5ffc1293611144612785308b0c">IsBase</a></div><div class="ttdeci">#define IsBase</div><div class="ttdef"><b>定义</b> <a href="#l00073">dl_concept.h:73</a></div></div>
<div class="ttc" id="adl__concept_8h_html_a6a4eeaf3b12c08feec3c35830657293f"><div class="ttname"><a href="dl__concept_8h.html#a6a4eeaf3b12c08feec3c35830657293f">IsPod</a></div><div class="ttdeci">#define IsPod</div><div class="ttdef"><b>定义</b> <a href="#l00071">dl_concept.h:71</a></div></div>
<div class="ttc" id="adl__concept_8h_html_a743a4510f291e356fc67efa0b375d1e8"><div class="ttname"><a href="dl__concept_8h.html#a743a4510f291e356fc67efa0b375d1e8">IsCopyable</a></div><div class="ttdeci">#define IsCopyable</div><div class="ttdef"><b>定义</b> <a href="#l00072">dl_concept.h:72</a></div></div>
<div class="ttc" id="adl__concept_8h_html_a7762439da1bf04d0bed1010a735511f3"><div class="ttname"><a href="dl__concept_8h.html#a7762439da1bf04d0bed1010a735511f3">IsReal</a></div><div class="ttdeci">#define IsReal</div><div class="ttdef"><b>定义</b> <a href="#l00068">dl_concept.h:68</a></div></div>
<div class="ttc" id="adl__concept_8h_html_ab17af810219f1bceede4ed860c82c1d0"><div class="ttname"><a href="dl__concept_8h.html#ab17af810219f1bceede4ed860c82c1d0">IsSigned</a></div><div class="ttdeci">#define IsSigned</div><div class="ttdef"><b>定义</b> <a href="#l00066">dl_concept.h:66</a></div></div>
<div class="ttc" id="adl__concept_8h_html_ad9e40980cee7ba9349ac5a2f57a774d9"><div class="ttname"><a href="dl__concept_8h.html#ad9e40980cee7ba9349ac5a2f57a774d9">IsUnsigned</a></div><div class="ttdeci">#define IsUnsigned</div><div class="ttdef"><b>定义</b> <a href="#l00065">dl_concept.h:65</a></div></div>
<div class="ttc" id="adl__concept_8h_html_add3178bdceee6213d83605422a6dfc41"><div class="ttname"><a href="dl__concept_8h.html#add3178bdceee6213d83605422a6dfc41">IsPointer</a></div><div class="ttdeci">#define IsPointer</div><div class="ttdef"><b>定义</b> <a href="#l00074">dl_concept.h:74</a></div></div>
<div class="ttc" id="adl__platform_8h_html"><div class="ttname"><a href="dl__platform_8h.html">dl_platform.h</a></div><div class="ttdoc">平台宏</div></div>
<div class="ttc" id="anamespacedl_html"><div class="ttname"><a href="namespacedl.html">dl</a></div><div class="ttdef"><b>定义</b> <a href="dl__array_8h_source.html#l00020">dl_array.h:21</a></div></div>
<div class="ttc" id="anamespacedl_html_a38a0162879cdbfbbe99ba16e7a170132ab9ece18c950afbfa6b0fdbfa4ff731d3"><div class="ttname"><a href="namespacedl.html#a38a0162879cdbfbbe99ba16e7a170132ab9ece18c950afbfa6b0fdbfa4ff731d3">dl::KeyCode::T</a></div><div class="ttdeci">@ T</div><div class="ttdef"><b>定义</b> <a href="dl__input_8h_source.html#l00122">dl_input.h:122</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1
</small></address>
</div><!-- doc-content -->
</body>
</html>