<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Bitmaske zu groß]]></title><description><![CDATA[<p>Gibt es eine Alternative zu folgendem typdef als Basis für ein Suchpattern?</p>
<pre><code class="language-cpp">typedef enum {
XXX_YYY = ((unsigned _int64)1) &lt;&lt; 64 // produces warning C4293: &quot;&lt;&lt;&quot;:
}
</code></pre>
<p>Für solche große Bitmasken suche ich noch eine Alternative Lösung. Jemand einen Vorschlag, der auch ähnlich performant ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/274732/bitmaske-zu-groß</link><generator>RSS for Node</generator><lastBuildDate>Thu, 27 Aug 2026 06:22:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/274732.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 01 Oct 2010 16:49:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bitmaske zu groß on Fri, 01 Oct 2010 16:49:02 GMT]]></title><description><![CDATA[<p>Gibt es eine Alternative zu folgendem typdef als Basis für ein Suchpattern?</p>
<pre><code class="language-cpp">typedef enum {
XXX_YYY = ((unsigned _int64)1) &lt;&lt; 64 // produces warning C4293: &quot;&lt;&lt;&quot;:
}
</code></pre>
<p>Für solche große Bitmasken suche ich noch eine Alternative Lösung. Jemand einen Vorschlag, der auch ähnlich performant ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960201</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960201</guid><dc:creator><![CDATA[Zickedi]]></dc:creator><pubDate>Fri, 01 Oct 2010 16:49:02 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Fri, 01 Oct 2010 16:53:37 GMT]]></title><description><![CDATA[<p>`const unsigned long XXX_YYY = 1 &lt;&lt; 64;</p>
<p>`</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960204</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960204</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Fri, 01 Oct 2010 16:53:37 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Fri, 01 Oct 2010 16:54:20 GMT]]></title><description><![CDATA[<p>zwei Bitmasken.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960206</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960206</guid><dc:creator><![CDATA[größer sind]]></dc:creator><pubDate>Fri, 01 Oct 2010 16:54:20 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Fri, 01 Oct 2010 17:39:43 GMT]]></title><description><![CDATA[<p>Für den Fall, dass eine Ganzzahlvariable, nennen wir sie &quot;zahl&quot;, nur N Bit breit ist, dann ist sowohl zahl&lt;&lt;s als auch zahl&gt;&gt;s für den Fall s&gt;=N oder s&lt;0 sowieso nicht erlaubt ... also entweder &quot;undefined behaviour&quot; oder &quot;implementation-defined&quot; (bin zu faul zum Nachgucken).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960213</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960213</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Fri, 01 Oct 2010 17:39:43 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Fri, 01 Oct 2010 17:16:01 GMT]]></title><description><![CDATA[<p>Der Fall X &lt;&lt; 0 und X &gt;&gt; 0 übrigens auch!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960214</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960214</guid><dc:creator><![CDATA[asfdf]]></dc:creator><pubDate>Fri, 01 Oct 2010 17:16:01 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Fri, 01 Oct 2010 18:06:50 GMT]]></title><description><![CDATA[<p>D.h. mit der Bitmaske kann ich nicht mehr als 64 Werte prüfen. Müsste ich also selber mit einer Liste/set die Elemente halten und nach dem suchenden Wert abgleichen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960225</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960225</guid><dc:creator><![CDATA[Zickedi]]></dc:creator><pubDate>Fri, 01 Oct 2010 18:06:50 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Fri, 01 Oct 2010 18:16:24 GMT]]></title><description><![CDATA[<p>Zickedi schrieb:</p>
<blockquote>
<p>D.h. mit der Bitmaske kann ich nicht mehr als 64 Werte prüfen. Müsste ich also selber mit einer Liste/set die Elemente halten und nach dem suchenden Wert abgleichen?</p>
</blockquote>
<p>Was hast du überhaupt vor? Es gäbe da zum Beispiel noch std::bitset.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960229</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960229</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Fri, 01 Oct 2010 18:16:24 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Fri, 01 Oct 2010 18:26:20 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>Es gäbe da zum Beispiel noch std::bitset.</p>
</blockquote>
<p>Ist die nicht auch begrenzt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960232</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960232</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 01 Oct 2010 18:26:20 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Fri, 01 Oct 2010 19:02:08 GMT]]></title><description><![CDATA[<blockquote>
<p>Was hast du überhaupt vor?</p>
</blockquote>
<pre><code class="language-cpp">typedef enum {
[...]
XXX_YYY = ((unsigned _int64)1) &lt;&lt; 64, // produces warning C4293: &quot;&lt;&lt;&quot;:
[...]
} MyType;

typedef unsigned int TypeMask;
TypeMask myMask = XXX_YYY | [..];

if ( myMask &amp; currentType ) {
[...]
</code></pre>
<p>Problem ist nur, dass ich mehr als 64 Typen habe.</p>
<p>Beschreibung:<br />
Es soll ein (Text)Parser sein, der mit einem vorgegebenen Suchpattern filtern kann und gleichzeitig performant arbeitet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960240</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960240</guid><dc:creator><![CDATA[Zickedi]]></dc:creator><pubDate>Fri, 01 Oct 2010 19:02:08 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Fri, 01 Oct 2010 18:53:09 GMT]]></title><description><![CDATA[<p>Versuch mal zu beschreiben, was du vor hast - nicht, wie du es implementieren willst</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960242</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960242</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Fri, 01 Oct 2010 18:53:09 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Fri, 01 Oct 2010 23:35:23 GMT]]></title><description><![CDATA[<p>Wenn die Variable nur 64 Bit hat, kann man eben auch nur auf 64 Bit prüfen.<br />
Da musst du dir wohl was anderes einfallen lassen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960301</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960301</guid><dc:creator><![CDATA[ipsec]]></dc:creator><pubDate>Fri, 01 Oct 2010 23:35:23 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Fri, 01 Oct 2010 23:45:22 GMT]]></title><description><![CDATA[<p>Vielen Dank für den qualifizierten Beitrag.<br />
Ich habe mich gerade deshalb an das Forum gewandt, weil hier eigentlich immer gute Hinweise/Ideen gemacht werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960303</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960303</guid><dc:creator><![CDATA[Zickedi]]></dc:creator><pubDate>Fri, 01 Oct 2010 23:45:22 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Sat, 02 Oct 2010 00:12:21 GMT]]></title><description><![CDATA[<p>Zickedi schrieb:</p>
<blockquote>
<p>Vielen Dank für den qualifizierten Beitrag.<br />
Ich habe mich gerade deshalb an das Forum gewandt, weil hier eigentlich immer gute Hinweise/Ideen gemacht werden.</p>
</blockquote>
<p>Wird schon, keine Bange.<br />
Aber ich fürchte, die Lösung, die wir nachher zusammen erarbeiten, wird Dich überraschen. Und sie wird kaum noch so aussehen wie Dein Ansatz. Sie wird sogar Techniken und Sprachmittel einsetzen, die Du noch nicht kennst. Aber das ist auch gut so. Deswegen magst Du ja dieses Forum.<br />
Jetzt ist unskilled stark zielführend.<br />
&quot;Versuch mal zu beschreiben, was du vor hast - nicht, wie du es implementieren willst&quot;<br />
Vielleicht gibt es in C++ viel stärkere Tricks als Bitfelder. Laß mal unskilled ein wenig rumzaubern, der kann entgegen seines Nicks schon einiges. So Dinge halt. So Dinge, weshalb C++ bei einigen Spielern einen schlechten Ruf hat.<br />
*Popcorn hol*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960304</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960304</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Sat, 02 Oct 2010 00:12:21 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Sat, 02 Oct 2010 02:10:59 GMT]]></title><description><![CDATA[<p>Zickedi schrieb:</p>
<blockquote>
<blockquote>
<p>Was hast du überhaupt vor?</p>
</blockquote>
<pre><code class="language-cpp">typedef enum {
[...]
XXX_YYY = ((unsigned _int64)1) &lt;&lt; 64, // produces warning C4293: &quot;&lt;&lt;&quot;:
[...]
} MyType;

typedef unsigned int TypeMask;
TypeMask myMask = XXX_YYY | [..];

if ( myMask &amp; currentType ) {
[...]
</code></pre>
<p>Problem ist nur, dass ich mehr als 64 Typen habe.</p>
</blockquote>
<p>Damit kann man 1.84467441 × 10<sup>19</sup> Typen definieren, wenn man mask == currentType vergleicht.</p>
<blockquote>
<p>Beschreibung:<br />
Es soll ein (Text)Parser sein, der mit einem vorgegebenen Suchpattern filtern kann und gleichzeitig performant arbeitet.</p>
</blockquote>
<p>Wozu brauchst du dazu so ein Enum?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960316</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960316</guid><dc:creator><![CDATA[ähm]]></dc:creator><pubDate>Sat, 02 Oct 2010 02:10:59 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Sat, 02 Oct 2010 10:51:56 GMT]]></title><description><![CDATA[<p>ähm schrieb:</p>
<blockquote>
<p>Damit kann man 1.84467441 × 10<sup>19</sup> Typen definieren, wenn man mask == currentType vergleicht.</p>
</blockquote>
<p>Damit hast du &quot;Typ&quot; aber neu definiert <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> Denn bei dir kann nur ein einzelner &quot;Typ&quot; gleichzeitig auftreten, der OP will aber mehr als 64 voneinander unabhängige &quot;Typen&quot;, die in Kombinationen auftreten können.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960406</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960406</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Sat, 02 Oct 2010 10:51:56 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Sat, 02 Oct 2010 11:26:11 GMT]]></title><description><![CDATA[<p>Michael E. schrieb:</p>
<blockquote>
<p>der OP will aber mehr als 64 voneinander unabhängige &quot;Typen&quot;, die in Kombinationen auftreten können.</p>
</blockquote>
<p>Solche Bitflag-Vergleiche funktionieren mit std::bitset doch problemlos, auch mit sehr vielen Bits. Was spricht also dagegen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960418</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960418</guid><dc:creator><![CDATA[nn]]></dc:creator><pubDate>Sat, 02 Oct 2010 11:26:11 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Sun, 03 Oct 2010 12:27:05 GMT]]></title><description><![CDATA[<p>Von meiner Seite aus nichts, frag den OP <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1960761</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1960761</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Sun, 03 Oct 2010 12:27:05 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Mon, 04 Oct 2010 10:47:50 GMT]]></title><description><![CDATA[<p>nn schrieb:</p>
<blockquote>
<p>Michael E. schrieb:</p>
<blockquote>
<p>der OP will aber mehr als 64 voneinander unabhängige &quot;Typen&quot;, die in Kombinationen auftreten können.</p>
</blockquote>
<p>Solche Bitflag-Vergleiche funktionieren mit std::bitset doch problemlos, auch mit sehr vielen Bits. Was spricht also dagegen ?</p>
</blockquote>
<p>Vermutlich dass es langsam wäre.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1961089</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1961089</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Mon, 04 Oct 2010 10:47:50 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Mon, 04 Oct 2010 15:29:13 GMT]]></title><description><![CDATA[<p>Ich verstehe auch noch immer nicht, wie ein Typ mehrere Typen sein kann...<br />
Ich meine - in welchem Bereich macht es denn Sinn, einen Variablen-Typ so dynamisch gestalten zu wollen? Wie soll der User-Code dazu dann aussehen?</p>
<p>Oder kanns doch immer nur 1 Typ sein und du dachtest, dass es so einfach schneller ausgewertet werden kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1961222</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1961222</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Mon, 04 Oct 2010 15:29:13 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Mon, 04 Oct 2010 18:47:05 GMT]]></title><description><![CDATA[<p>unskilled schrieb:</p>
<blockquote>
<p>Ich verstehe auch noch immer nicht, wie ein Typ mehrere Typen sein kann...</p>
</blockquote>
<p>Mehrfachvererbung?<br />
Bzw. reicht auch schon ganz normale Vererbung...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1961311</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1961311</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Mon, 04 Oct 2010 18:47:05 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Mon, 04 Oct 2010 23:22:21 GMT]]></title><description><![CDATA[<p>hustbaer schrieb:</p>
<blockquote>
<p>unskilled schrieb:</p>
<blockquote>
<p>Ich verstehe auch noch immer nicht, wie ein Typ mehrere Typen sein kann...</p>
</blockquote>
<p>Mehrfachvererbung?<br />
Bzw. reicht auch schon ganz normale Vererbung...</p>
</blockquote>
<p>da wärs vrmtl einfacher und performanter, für jeden typen ne fkt anzubieten...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1961415</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1961415</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Mon, 04 Oct 2010 23:22:21 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Mon, 04 Oct 2010 23:48:09 GMT]]></title><description><![CDATA[<p>Ich wollte dir nur auf deine Frage antworten, wie ein Type mehrere Typen sein kann.</p>
<p>Ob das so wie der OP es macht Sinn macht oder nicht - keine Ahnung, dazu müsste ich den Thread hier erstmal gründlicher lesen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1961417</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1961417</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Mon, 04 Oct 2010 23:48:09 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Tue, 05 Oct 2010 01:05:21 GMT]]></title><description><![CDATA[<p>Da findest Du auch nix. OPs letzter Beitrag zu dem Thema ist naemlich am Anfang von Seite 2 und trotzdem wird fleissig weiter diskutiert, obwohl niemand weiss, was OP will. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1961422</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1961422</guid><dc:creator><![CDATA[Eisflamme]]></dc:creator><pubDate>Tue, 05 Oct 2010 01:05:21 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmaske zu groß on Tue, 05 Oct 2010 02:28:52 GMT]]></title><description><![CDATA[<p>Hihi, das ist &quot;gute alte C++.de-Tradition&quot; <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /><br />
(OK, gut sei mal dahingestellt, aber alt auf jeden Fall)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1961425</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1961425</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Tue, 05 Oct 2010 02:28:52 GMT</pubDate></item></channel></rss>