Files
entt/entity_8hpp_source.html
T
2024-01-18 16:49:23 +01:00

321 lines
64 KiB
HTML

<!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="en-US">
<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.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EnTT: src/entt/entity/entity.hpp Source File</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>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen-awesome.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">EnTT<span id="projectnumber">&#160;3.13.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @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('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_66e9674e8206a335795995fa32a03c91.html">entt</a></li><li class="navelem"><a class="el" href="dir_e3a7bb56c55e5c2286e2fe96e197d4f5.html">entity</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">entity.hpp</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef ENTT_ENTITY_ENTITY_HPP</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define ENTT_ENTITY_ENTITY_HPP</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &lt;cstddef&gt;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &lt;type_traits&gt;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;../config/config.h&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &quot;fwd.hpp&quot;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceentt.html">entt</a> {</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">namespace </span>internal {</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// waiting for C++20 and std::popcount</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Type&gt;</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="keyword">constexpr</span> <span class="keywordtype">int</span> popcount(Type value) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keywordflow">return</span> value ? (int(value &amp; 1) + popcount(value &gt;&gt; 1)) : 0;</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</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">template</span>&lt;<span class="keyword">typename</span>, <span class="keyword">typename</span> = <span class="keywordtype">void</span>&gt;</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="keyword">struct </span>entt_traits;</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Type&gt;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="keyword">struct </span>entt_traits&lt;Type, std::enable_if_t&lt;std::is_enum_v&lt;Type&gt;&gt;&gt;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> : entt_traits&lt;std::underlying_type_t&lt;Type&gt;&gt; {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">using </span>value_type = Type;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>};</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Type&gt;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keyword">struct </span>entt_traits&lt;Type, std::enable_if_t&lt;std::is_class_v&lt;Type&gt;&gt;&gt;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> : entt_traits&lt;typename Type::entity_type&gt; {</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">using </span>value_type = Type;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span>};</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="keyword">struct </span>entt_traits&lt;std::uint32_t&gt; {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">using </span>value_type = std::uint32_t;</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="keyword">using </span>entity_type = std::uint32_t;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">using </span>version_type = std::uint16_t;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">static</span> <span class="keyword">constexpr</span> entity_type entity_mask = 0xFFFFF;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keyword">static</span> <span class="keyword">constexpr</span> entity_type version_mask = 0xFFF;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span>};</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="keyword">struct </span>entt_traits&lt;std::uint64_t&gt; {</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">using </span>value_type = std::uint64_t;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keyword">using </span>entity_type = std::uint64_t;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keyword">using </span>version_type = std::uint32_t;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">static</span> <span class="keyword">constexpr</span> entity_type entity_mask = 0xFFFFFFFF;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keyword">static</span> <span class="keyword">constexpr</span> entity_type version_mask = 0xFFFFFFFF;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span>};</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span>} <span class="comment">// namespace internal</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="comment"></span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Traits&gt;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="classentt_1_1basic__entt__traits.html"> 66</a></span><span class="keyword">class </span><a class="code hl_class" href="classentt_1_1basic__entt__traits.html">basic_entt_traits</a> {</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keyword">auto</span> length = internal::popcount(Traits::entity_mask);</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keyword">static_assert</span>(Traits::entity_mask &amp;&amp; ((<span class="keyword">typename</span> Traits::entity_type{1} &lt;&lt; length) == (Traits::entity_mask + 1)), <span class="stringliteral">&quot;Invalid entity mask&quot;</span>);</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keyword">static_assert</span>((<span class="keyword">typename</span> Traits::entity_type{1} &lt;&lt; internal::popcount(Traits::version_mask)) == (Traits::version_mask + 1), <span class="stringliteral">&quot;Invalid version mask&quot;</span>);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e"> 74</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">value_type</a> = <span class="keyword">typename</span> Traits::value_type;</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793"> 76</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entity_type</a> = <span class="keyword">typename</span> Traits::entity_type;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="classentt_1_1basic__entt__traits.html#aa3fe33d19b228d07c5560b907f910c10"> 78</a></span> <span class="keyword">using </span><a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#aa3fe33d19b228d07c5560b907f910c10">version_type</a> = <span class="keyword">typename</span> Traits::version_type;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="classentt_1_1basic__entt__traits.html#a6b93920c3b3347171c485fdbdead14ec"> 81</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entity_type</a> <a class="code hl_variable" href="classentt_1_1basic__entt__traits.html#a6b93920c3b3347171c485fdbdead14ec">entity_mask</a> = Traits::entity_mask;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="classentt_1_1basic__entt__traits.html#a0bd49c229b049ac5dc0fb21195b4bcc3"> 83</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entity_type</a> <a class="code hl_variable" href="classentt_1_1basic__entt__traits.html#a0bd49c229b049ac5dc0fb21195b4bcc3">version_mask</a> = Traits::version_mask;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0"> 90</a></span> [[nodiscard]] <span class="keyword">static</span> <span class="keyword">constexpr</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entity_type</a> <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">to_integral</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">value_type</a> value) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entity_type</a><span class="keyword">&gt;</span>(value);</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"><a class="line" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463"> 99</a></span> [[nodiscard]] <span class="keyword">static</span> <span class="keyword">constexpr</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entity_type</a> <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">to_entity</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">value_type</a> value) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordflow">return</span> (<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">to_integral</a>(value) &amp; <a class="code hl_variable" href="classentt_1_1basic__entt__traits.html#a6b93920c3b3347171c485fdbdead14ec">entity_mask</a>);</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> }</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="classentt_1_1basic__entt__traits.html#af1e3c418f09660a761fab21078df6700"> 108</a></span> [[nodiscard]] <span class="keyword">static</span> <span class="keyword">constexpr</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#aa3fe33d19b228d07c5560b907f910c10">version_type</a> <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#af1e3c418f09660a761fab21078df6700">to_version</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">value_type</a> value) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">return</span> (<span class="keyword">static_cast&lt;</span><a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#aa3fe33d19b228d07c5560b907f910c10">version_type</a><span class="keyword">&gt;</span>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">to_integral</a>(value) &gt;&gt; length) &amp; <a class="code hl_variable" href="classentt_1_1basic__entt__traits.html#a0bd49c229b049ac5dc0fb21195b4bcc3">version_mask</a>);</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> }</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"><a class="line" href="classentt_1_1basic__entt__traits.html#a42a94cfb5923165804979505731ad7c6"> 117</a></span> [[nodiscard]] <span class="keyword">static</span> <span class="keyword">constexpr</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">value_type</a> <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a42a94cfb5923165804979505731ad7c6">next</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">value_type</a> value) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keyword">const</span> <span class="keyword">auto</span> vers = <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#af1e3c418f09660a761fab21078df6700">to_version</a>(value) + 1;</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a3d3c3e8fd538fb4394ea505dd0415ec5">construct</a>(<a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">to_integral</a>(value), <span class="keyword">static_cast&lt;</span><a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#aa3fe33d19b228d07c5560b907f910c10">version_type</a><span class="keyword">&gt;</span>(vers + (vers == <a class="code hl_variable" href="classentt_1_1basic__entt__traits.html#a0bd49c229b049ac5dc0fb21195b4bcc3">version_mask</a>)));</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> }</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"><a class="line" href="classentt_1_1basic__entt__traits.html#a3d3c3e8fd538fb4394ea505dd0415ec5"> 132</a></span> [[nodiscard]] <span class="keyword">static</span> <span class="keyword">constexpr</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">value_type</a> <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a3d3c3e8fd538fb4394ea505dd0415ec5">construct</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entity_type</a> <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>, <span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#aa3fe33d19b228d07c5560b907f910c10">version_type</a> version) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">value_type</a>{(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a> &amp; <a class="code hl_variable" href="classentt_1_1basic__entt__traits.html#a6b93920c3b3347171c485fdbdead14ec">entity_mask</a>) | (<span class="keyword">static_cast&lt;</span><a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entity_type</a><span class="keyword">&gt;</span>(version &amp; <a class="code hl_variable" href="classentt_1_1basic__entt__traits.html#a0bd49c229b049ac5dc0fb21195b4bcc3">version_mask</a>) &lt;&lt; length)};</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> }</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b"> 146</a></span> [[nodiscard]] <span class="keyword">static</span> <span class="keyword">constexpr</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">value_type</a> <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">combine</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entity_type</a> lhs, <span class="keyword">const</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entity_type</a> rhs) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">value_type</a>{(lhs &amp; <a class="code hl_variable" href="classentt_1_1basic__entt__traits.html#a6b93920c3b3347171c485fdbdead14ec">entity_mask</a>) | (rhs &amp; (<a class="code hl_variable" href="classentt_1_1basic__entt__traits.html#a0bd49c229b049ac5dc0fb21195b4bcc3">version_mask</a> &lt;&lt; length))};</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> }</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span>};</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Type&gt;</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"><a class="line" href="structentt_1_1entt__traits.html"> 156</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structentt_1_1entt__traits.html">entt_traits</a>: <a class="code hl_class" href="classentt_1_1basic__entt__traits.html">basic_entt_traits</a>&lt;internal::entt_traits&lt;Type&gt;&gt; {</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"><a class="line" href="structentt_1_1entt__traits.html#a9289d7b999755669c5caa3df9626ec3e"> 158</a></span> <span class="keyword">using </span><a class="code hl_class" href="classentt_1_1basic__entt__traits.html">base_type</a> = <a class="code hl_class" href="classentt_1_1basic__entt__traits.html">basic_entt_traits&lt;internal::entt_traits&lt;Type&gt;</a>&gt;;</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"><a class="line" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83"> 160</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> std::size_t <a class="code hl_variable" href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">page_size</a> = ENTT_SPARSE_PAGE;</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span>};</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="namespaceentt.html#ad2e252dbd8c8ebd486a3d84fbf8c2602"> 170</a></span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keyword">typename</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entt_traits&lt;Entity&gt;::entity_type</a> <a class="code hl_function" href="namespaceentt.html#ad2e252dbd8c8ebd486a3d84fbf8c2602">to_integral</a>(<span class="keyword">const</span> Entity value) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">entt_traits&lt;Entity&gt;::to_integral</a>(value);</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span>}</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> </div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"><a class="line" href="namespaceentt.html#a1202b4027d32db124efffdf1f2f8c5a2"> 181</a></span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keyword">typename</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entt_traits&lt;Entity&gt;::entity_type</a> <a class="code hl_function" href="namespaceentt.html#a1202b4027d32db124efffdf1f2f8c5a2">to_entity</a>(<span class="keyword">const</span> Entity value) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">entt_traits&lt;Entity&gt;::to_entity</a>(value);</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span>}</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> </div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"><a class="line" href="namespaceentt.html#a4b7d8995ec3448ce5151309ef2281d33"> 192</a></span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keyword">typename</span> <a class="code hl_typedef" href="classentt_1_1basic__entt__traits.html#aa3fe33d19b228d07c5560b907f910c10">entt_traits&lt;Entity&gt;::version_type</a> <a class="code hl_function" href="namespaceentt.html#a4b7d8995ec3448ce5151309ef2281d33">to_version</a>(<span class="keyword">const</span> Entity value) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classentt_1_1basic__entt__traits.html#af1e3c418f09660a761fab21078df6700">entt_traits&lt;Entity&gt;::to_version</a>(value);</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span>}</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> </div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"><a class="line" href="structentt_1_1null__t.html"> 197</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structentt_1_1null__t.html">null_t</a> {</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"><a class="line" href="structentt_1_1null__t.html#a645f6d96cbb99f7b245058a05bf0e28b"> 204</a></span> [[nodiscard]] <span class="keyword">constexpr</span> <span class="keyword">operator</span> Entity() const noexcept {</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keyword">using </span>traits_type = <a class="code hl_struct" href="structentt_1_1entt__traits.html">entt_traits&lt;Entity&gt;</a>;</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <span class="keyword">constexpr</span> <span class="keyword">auto</span> value = traits_type::construct(traits_type::entity_mask, traits_type::version_mask);</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="keywordflow">return</span> value;</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> }</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> </div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"><a class="line" href="structentt_1_1null__t.html#aed9c63b072bec4c7c6c15dc110620a93"> 215</a></span> [[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structentt_1_1null__t.html#aed9c63b072bec4c7c6c15dc110620a93">operator==</a>([[maybe_unused]] <span class="keyword">const</span> <a class="code hl_struct" href="structentt_1_1null__t.html">null_t</a> other) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> }</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> </div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"><a class="line" href="structentt_1_1null__t.html#a6736a78ac5ffa158b229fdf4fefcdc34"> 224</a></span> [[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structentt_1_1null__t.html#a6736a78ac5ffa158b229fdf4fefcdc34">operator!=</a>([[maybe_unused]] <span class="keyword">const</span> <a class="code hl_struct" href="structentt_1_1null__t.html">null_t</a> other) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> }</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> </div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"><a class="line" href="structentt_1_1null__t.html#a1b143232fe50fc52fee376f4f8e23a76"> 235</a></span> [[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structentt_1_1null__t.html#a1b143232fe50fc52fee376f4f8e23a76">operator==</a>(<span class="keyword">const</span> Entity <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> <span class="keyword">using </span>traits_type = <a class="code hl_struct" href="structentt_1_1entt__traits.html">entt_traits&lt;Entity&gt;</a>;</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="keywordflow">return</span> traits_type::to_entity(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>) == traits_type::to_entity(*<span class="keyword">this</span>);</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> }</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> </div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"><a class="line" href="structentt_1_1null__t.html#a2c8a4bdade66b7f7520d10b4bb4fc858"> 247</a></span> [[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structentt_1_1null__t.html#a2c8a4bdade66b7f7520d10b4bb4fc858">operator!=</a>(<span class="keyword">const</span> Entity <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> <span class="keywordflow">return</span> !(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a> == *<span class="keyword">this</span>);</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> }</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span>};</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> </div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"><a class="line" href="namespaceentt.html#a6bd28fe24ca2b9544e78a296ce43ec2e"> 260</a></span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#af7c61951b721a1e3612cf536bd707501">operator==</a>(<span class="keyword">const</span> Entity <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>, <span class="keyword">const</span> <a class="code hl_struct" href="structentt_1_1null__t.html">null_t</a> other) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> <span class="keywordflow">return</span> other.operator==(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>);</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span>}</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> </div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"><a class="line" href="namespaceentt.html#a0bfb4a52063118617d88ed10c9241cf1"> 272</a></span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#ad9accc71a383509ada028f7fa2b767bf">operator!=</a>(<span class="keyword">const</span> Entity <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>, <span class="keyword">const</span> <a class="code hl_struct" href="structentt_1_1null__t.html">null_t</a> other) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <span class="keywordflow">return</span> !(other == <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>);</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span>}</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> </div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"><a class="line" href="structentt_1_1tombstone__t.html"> 277</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structentt_1_1tombstone__t.html">tombstone_t</a> {</div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"><a class="line" href="structentt_1_1tombstone__t.html#a7ac55427538dd1b5e39ec064a4ffdd14"> 284</a></span> [[nodiscard]] <span class="keyword">constexpr</span> <span class="keyword">operator</span> Entity() const noexcept {</div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> <span class="keyword">using </span>traits_type = <a class="code hl_struct" href="structentt_1_1entt__traits.html">entt_traits&lt;Entity&gt;</a>;</div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> <span class="keyword">constexpr</span> <span class="keyword">auto</span> value = traits_type::construct(traits_type::entity_mask, traits_type::version_mask);</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> <span class="keywordflow">return</span> value;</div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> }</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> </div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"><a class="line" href="structentt_1_1tombstone__t.html#af95e989594791f7eb458b22269b0a3b5"> 295</a></span> [[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structentt_1_1tombstone__t.html#af95e989594791f7eb458b22269b0a3b5">operator==</a>([[maybe_unused]] <span class="keyword">const</span> <a class="code hl_struct" href="structentt_1_1tombstone__t.html">tombstone_t</a> other) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> }</div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> </div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"><a class="line" href="structentt_1_1tombstone__t.html#ac4d838cb66da20f90041cf6e57775512"> 304</a></span> [[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structentt_1_1tombstone__t.html#ac4d838cb66da20f90041cf6e57775512">operator!=</a>([[maybe_unused]] <span class="keyword">const</span> <a class="code hl_struct" href="structentt_1_1tombstone__t.html">tombstone_t</a> other) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> }</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> </div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"><a class="line" href="structentt_1_1tombstone__t.html#a872e744dc422954ddcdfbbb191d8ec34"> 315</a></span> [[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structentt_1_1tombstone__t.html#a872e744dc422954ddcdfbbb191d8ec34">operator==</a>(<span class="keyword">const</span> Entity <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> <span class="keyword">using </span>traits_type = <a class="code hl_struct" href="structentt_1_1entt__traits.html">entt_traits&lt;Entity&gt;</a>;</div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> <span class="keywordflow">return</span> traits_type::to_version(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>) == traits_type::to_version(*<span class="keyword">this</span>);</div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> }</div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> </div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"><a class="line" href="structentt_1_1tombstone__t.html#ac66ba66ee149c57866a9a97ac1188eba"> 327</a></span> [[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structentt_1_1tombstone__t.html#ac66ba66ee149c57866a9a97ac1188eba">operator!=</a>(<span class="keyword">const</span> Entity <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> <span class="keywordflow">return</span> !(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a> == *<span class="keyword">this</span>);</div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> }</div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span>};</div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> </div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"><a class="line" href="namespaceentt.html#a067be6e3c78e4d6da28edce305773a0e"> 340</a></span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#af7c61951b721a1e3612cf536bd707501">operator==</a>(<span class="keyword">const</span> Entity <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>, <span class="keyword">const</span> <a class="code hl_struct" href="structentt_1_1tombstone__t.html">tombstone_t</a> other) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> <span class="keywordflow">return</span> other.operator==(<a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>);</div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span>}</div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> </div>
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Entity&gt;</div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"><a class="line" href="namespaceentt.html#a00032301649c088b76e496ba0d984ab0"> 352</a></span>[[nodiscard]] <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespaceentt.html#ad9accc71a383509ada028f7fa2b767bf">operator!=</a>(<span class="keyword">const</span> Entity <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>, <span class="keyword">const</span> <a class="code hl_struct" href="structentt_1_1tombstone__t.html">tombstone_t</a> other) <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> <span class="keywordflow">return</span> !(other == <a class="code hl_enumeration" href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entity</a>);</div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span>}</div>
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> </div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"><a class="line" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b"> 363</a></span><span class="keyword">inline</span> <span class="keyword">constexpr</span> <a class="code hl_struct" href="structentt_1_1null__t.html">null_t</a> <a class="code hl_variable" href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">null</a>{};</div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> </div>
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"><a class="line" href="namespaceentt.html#a674269102fdfe3fd6d7766210a828862"> 372</a></span><span class="keyword">inline</span> <span class="keyword">constexpr</span> <a class="code hl_struct" href="structentt_1_1tombstone__t.html">tombstone_t</a> <a class="code hl_variable" href="namespaceentt.html#a674269102fdfe3fd6d7766210a828862">tombstone</a>{};</div>
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span> </div>
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span>} <span class="comment">// namespace entt</span></div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> </div>
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html">entt::basic_entt_traits</a></div><div class="ttdoc">Common basic entity traits implementation.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00066">entity.hpp:66</a></div></div>
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a066f3db5d13496df1e1fbc8659197793"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a066f3db5d13496df1e1fbc8659197793">entt::basic_entt_traits::entity_type</a></div><div class="ttdeci">typename Traits::entity_type entity_type</div><div class="ttdoc">Underlying entity type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00076">entity.hpp:76</a></div></div>
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a0bd49c229b049ac5dc0fb21195b4bcc3"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a0bd49c229b049ac5dc0fb21195b4bcc3">entt::basic_entt_traits::version_mask</a></div><div class="ttdeci">static constexpr entity_type version_mask</div><div class="ttdoc">Version mask size.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00083">entity.hpp:83</a></div></div>
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a3d3c3e8fd538fb4394ea505dd0415ec5"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a3d3c3e8fd538fb4394ea505dd0415ec5">entt::basic_entt_traits::construct</a></div><div class="ttdeci">static constexpr value_type construct(const entity_type entity, const version_type version) noexcept</div><div class="ttdoc">Constructs an identifier from its parts.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00132">entity.hpp:132</a></div></div>
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a42a94cfb5923165804979505731ad7c6"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a42a94cfb5923165804979505731ad7c6">entt::basic_entt_traits::next</a></div><div class="ttdeci">static constexpr value_type next(const value_type value) noexcept</div><div class="ttdoc">Returns the successor of a given identifier.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00117">entity.hpp:117</a></div></div>
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a4eb435084cf47d4fbc840654f2e8c9e0"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a4eb435084cf47d4fbc840654f2e8c9e0">entt::basic_entt_traits::to_integral</a></div><div class="ttdeci">static constexpr entity_type to_integral(const value_type value) noexcept</div><div class="ttdoc">Converts an entity to its underlying type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00090">entity.hpp:90</a></div></div>
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a6b93920c3b3347171c485fdbdead14ec"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a6b93920c3b3347171c485fdbdead14ec">entt::basic_entt_traits::entity_mask</a></div><div class="ttdeci">static constexpr entity_type entity_mask</div><div class="ttdoc">Entity mask size.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00081">entity.hpp:81</a></div></div>
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a8c02bc8db33817ec509b7d32773fa463"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a8c02bc8db33817ec509b7d32773fa463">entt::basic_entt_traits::to_entity</a></div><div class="ttdeci">static constexpr entity_type to_entity(const value_type value) noexcept</div><div class="ttdoc">Returns the entity part once converted to the underlying type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00099">entity.hpp:99</a></div></div>
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_a8d3ccdc302fc7dc567541fa12eca6b4e"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#a8d3ccdc302fc7dc567541fa12eca6b4e">entt::basic_entt_traits::value_type</a></div><div class="ttdeci">typename Traits::value_type value_type</div><div class="ttdoc">Value type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00074">entity.hpp:74</a></div></div>
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_aa3fe33d19b228d07c5560b907f910c10"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#aa3fe33d19b228d07c5560b907f910c10">entt::basic_entt_traits::version_type</a></div><div class="ttdeci">typename Traits::version_type version_type</div><div class="ttdoc">Underlying version type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00078">entity.hpp:78</a></div></div>
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_ad00358aea03a19c59efae2f8c005ae9b"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#ad00358aea03a19c59efae2f8c005ae9b">entt::basic_entt_traits::combine</a></div><div class="ttdeci">static constexpr value_type combine(const entity_type lhs, const entity_type rhs) noexcept</div><div class="ttdoc">Combines two identifiers in a single one.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00146">entity.hpp:146</a></div></div>
<div class="ttc" id="aclassentt_1_1basic__entt__traits_html_af1e3c418f09660a761fab21078df6700"><div class="ttname"><a href="classentt_1_1basic__entt__traits.html#af1e3c418f09660a761fab21078df6700">entt::basic_entt_traits::to_version</a></div><div class="ttdeci">static constexpr version_type to_version(const value_type value) noexcept</div><div class="ttdoc">Returns the version part once converted to the underlying type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00108">entity.hpp:108</a></div></div>
<div class="ttc" id="anamespaceentt_html"><div class="ttname"><a href="namespaceentt.html">entt</a></div><div class="ttdoc">EnTT default namespace.</div><div class="ttdef"><b>Definition</b> <a href="dense__map_8hpp_source.html#l00021">dense_map.hpp:21</a></div></div>
<div class="ttc" id="anamespaceentt_html_a0b54e231d069e8a231e14b223388808a"><div class="ttname"><a href="namespaceentt.html#a0b54e231d069e8a231e14b223388808a">entt::entity</a></div><div class="ttdeci">entity</div><div class="ttdoc">Default entity identifier.</div><div class="ttdef"><b>Definition</b> <a href="entity_2fwd_8hpp_source.html#l00013">fwd.hpp:13</a></div></div>
<div class="ttc" id="anamespaceentt_html_a1202b4027d32db124efffdf1f2f8c5a2"><div class="ttname"><a href="namespaceentt.html#a1202b4027d32db124efffdf1f2f8c5a2">entt::to_entity</a></div><div class="ttdeci">constexpr entt_traits&lt; Entity &gt;::entity_type to_entity(const Entity value) noexcept</div><div class="ttdoc">Returns the entity part once converted to the underlying type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00181">entity.hpp:181</a></div></div>
<div class="ttc" id="anamespaceentt_html_a2f0c0a1c1d953ea991591748744cdd8b"><div class="ttname"><a href="namespaceentt.html#a2f0c0a1c1d953ea991591748744cdd8b">entt::null</a></div><div class="ttdeci">constexpr null_t null</div><div class="ttdoc">Compile-time constant for null entities.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00363">entity.hpp:363</a></div></div>
<div class="ttc" id="anamespaceentt_html_a4b7d8995ec3448ce5151309ef2281d33"><div class="ttname"><a href="namespaceentt.html#a4b7d8995ec3448ce5151309ef2281d33">entt::to_version</a></div><div class="ttdeci">constexpr entt_traits&lt; Entity &gt;::version_type to_version(const Entity value) noexcept</div><div class="ttdoc">Returns the version part once converted to the underlying type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00192">entity.hpp:192</a></div></div>
<div class="ttc" id="anamespaceentt_html_a674269102fdfe3fd6d7766210a828862"><div class="ttname"><a href="namespaceentt.html#a674269102fdfe3fd6d7766210a828862">entt::tombstone</a></div><div class="ttdeci">constexpr tombstone_t tombstone</div><div class="ttdoc">Compile-time constant for tombstone entities.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00372">entity.hpp:372</a></div></div>
<div class="ttc" id="anamespaceentt_html_ad2e252dbd8c8ebd486a3d84fbf8c2602"><div class="ttname"><a href="namespaceentt.html#ad2e252dbd8c8ebd486a3d84fbf8c2602">entt::to_integral</a></div><div class="ttdeci">constexpr entt_traits&lt; Entity &gt;::entity_type to_integral(const Entity value) noexcept</div><div class="ttdoc">Converts an entity to its underlying type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00170">entity.hpp:170</a></div></div>
<div class="ttc" id="anamespaceentt_html_ad9accc71a383509ada028f7fa2b767bf"><div class="ttname"><a href="namespaceentt.html#ad9accc71a383509ada028f7fa2b767bf">entt::operator!=</a></div><div class="ttdeci">constexpr bool operator!=(const basic_hashed_string&lt; Char &gt; &amp;lhs, const basic_hashed_string&lt; Char &gt; &amp;rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00241">hashed_string.hpp:241</a></div></div>
<div class="ttc" id="anamespaceentt_html_af7c61951b721a1e3612cf536bd707501"><div class="ttname"><a href="namespaceentt.html#af7c61951b721a1e3612cf536bd707501">entt::operator==</a></div><div class="ttdeci">constexpr bool operator==(const basic_hashed_string&lt; Char &gt; &amp;lhs, const basic_hashed_string&lt; Char &gt; &amp;rhs) noexcept</div><div class="ttdoc">Compares two hashed strings.</div><div class="ttdef"><b>Definition</b> <a href="hashed__string_8hpp_source.html#l00229">hashed_string.hpp:229</a></div></div>
<div class="ttc" id="astructentt_1_1entt__traits_html"><div class="ttname"><a href="structentt_1_1entt__traits.html">entt::entt_traits</a></div><div class="ttdoc">Entity traits.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00156">entity.hpp:156</a></div></div>
<div class="ttc" id="astructentt_1_1entt__traits_html_a187c362626da03111928aff88f43bb83"><div class="ttname"><a href="structentt_1_1entt__traits.html#a187c362626da03111928aff88f43bb83">entt::entt_traits::page_size</a></div><div class="ttdeci">static constexpr std::size_t page_size</div><div class="ttdoc">Page size, default is ENTT_SPARSE_PAGE.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00160">entity.hpp:160</a></div></div>
<div class="ttc" id="astructentt_1_1null__t_html"><div class="ttname"><a href="structentt_1_1null__t.html">entt::null_t</a></div><div class="ttdoc">Null object for all identifiers.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00197">entity.hpp:197</a></div></div>
<div class="ttc" id="astructentt_1_1null__t_html_a1b143232fe50fc52fee376f4f8e23a76"><div class="ttname"><a href="structentt_1_1null__t.html#a1b143232fe50fc52fee376f4f8e23a76">entt::null_t::operator==</a></div><div class="ttdeci">constexpr bool operator==(const Entity entity) const noexcept</div><div class="ttdoc">Compares a null object and an identifier of any type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00235">entity.hpp:235</a></div></div>
<div class="ttc" id="astructentt_1_1null__t_html_a2c8a4bdade66b7f7520d10b4bb4fc858"><div class="ttname"><a href="structentt_1_1null__t.html#a2c8a4bdade66b7f7520d10b4bb4fc858">entt::null_t::operator!=</a></div><div class="ttdeci">constexpr bool operator!=(const Entity entity) const noexcept</div><div class="ttdoc">Compares a null object and an identifier of any type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00247">entity.hpp:247</a></div></div>
<div class="ttc" id="astructentt_1_1null__t_html_a6736a78ac5ffa158b229fdf4fefcdc34"><div class="ttname"><a href="structentt_1_1null__t.html#a6736a78ac5ffa158b229fdf4fefcdc34">entt::null_t::operator!=</a></div><div class="ttdeci">constexpr bool operator!=(const null_t other) const noexcept</div><div class="ttdoc">Compares two null objects.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00224">entity.hpp:224</a></div></div>
<div class="ttc" id="astructentt_1_1null__t_html_aed9c63b072bec4c7c6c15dc110620a93"><div class="ttname"><a href="structentt_1_1null__t.html#aed9c63b072bec4c7c6c15dc110620a93">entt::null_t::operator==</a></div><div class="ttdeci">constexpr bool operator==(const null_t other) const noexcept</div><div class="ttdoc">Compares two null objects.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00215">entity.hpp:215</a></div></div>
<div class="ttc" id="astructentt_1_1tombstone__t_html"><div class="ttname"><a href="structentt_1_1tombstone__t.html">entt::tombstone_t</a></div><div class="ttdoc">Tombstone object for all identifiers.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00277">entity.hpp:277</a></div></div>
<div class="ttc" id="astructentt_1_1tombstone__t_html_a872e744dc422954ddcdfbbb191d8ec34"><div class="ttname"><a href="structentt_1_1tombstone__t.html#a872e744dc422954ddcdfbbb191d8ec34">entt::tombstone_t::operator==</a></div><div class="ttdeci">constexpr bool operator==(const Entity entity) const noexcept</div><div class="ttdoc">Compares a tombstone object and an identifier of any type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00315">entity.hpp:315</a></div></div>
<div class="ttc" id="astructentt_1_1tombstone__t_html_ac4d838cb66da20f90041cf6e57775512"><div class="ttname"><a href="structentt_1_1tombstone__t.html#ac4d838cb66da20f90041cf6e57775512">entt::tombstone_t::operator!=</a></div><div class="ttdeci">constexpr bool operator!=(const tombstone_t other) const noexcept</div><div class="ttdoc">Compares two tombstone objects.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00304">entity.hpp:304</a></div></div>
<div class="ttc" id="astructentt_1_1tombstone__t_html_ac66ba66ee149c57866a9a97ac1188eba"><div class="ttname"><a href="structentt_1_1tombstone__t.html#ac66ba66ee149c57866a9a97ac1188eba">entt::tombstone_t::operator!=</a></div><div class="ttdeci">constexpr bool operator!=(const Entity entity) const noexcept</div><div class="ttdoc">Compares a tombstone object and an identifier of any type.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00327">entity.hpp:327</a></div></div>
<div class="ttc" id="astructentt_1_1tombstone__t_html_af95e989594791f7eb458b22269b0a3b5"><div class="ttname"><a href="structentt_1_1tombstone__t.html#af95e989594791f7eb458b22269b0a3b5">entt::tombstone_t::operator==</a></div><div class="ttdeci">constexpr bool operator==(const tombstone_t other) const noexcept</div><div class="ttdoc">Compares two tombstone objects.</div><div class="ttdef"><b>Definition</b> <a href="entity_8hpp_source.html#l00295">entity.hpp:295</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
</small></address>
</body>
</html>