Boost C++ Libraries: Ticket #653: [integer] add support for integers longer than long https://svn.boost.org/trac10/ticket/653 <pre class="wiki">With the endian discussion, I looked at Boost.Integer to try to figure out why it didn't support long long and __int64 where possible. Since I couldn't see a reason why it shouldn't, I went ahead and implemented it. The only major interface change is adding additional ValueUpper template parameters to int_(max|min)_value_t and uint_value_t. They default to 0, so no valid old code should be affected. They allow the programmer to use, for example, uint_value_t&lt;0x34567890,0x12&gt; to request a type that can hold 0x1234567890 or int_min_value_t&lt;-0x34567890,-0x12&gt; to request a type that can hold -0x1234567890, which will properly fail if there are no types available over 32 bits (instead of just truncating the constant and giving the wrong result). I also took the opportunity to add int_exact_t templates for cases where an exact number of bits is needed. int_exact_t&lt;32&gt;::exact, for example. ( Ideally this would be an additional typedef inside int_t and uint_t, but I couldn't come up with a simple way of doing that. If it were acceptable to have exact as a typedef for void when not available, it'd be easy, but that goes against existing practice. ) If this isn't wanted, it's very easy to remove. If this looks good I'll try to decipher the macros in the test suite to add some new ones. The changes don't cause any regressions from integer_test.cpp under my g++ 3.3.6, 3.4.6, or 4.1.1. In keeping with the rationale and noticing that it works just about all the compilers, I used no partial specialisation or recursion, so I'm hoping that it'll work fine in the more troublesome compilers as well. Unfortunately portage tell me that gcc-2* is to old to work with the rest of my system, so I haven't been able to try. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/653 Trac 1.4.3 Niels Dekker Wed, 06 Jun 2007 10:04:29 GMT <link>https://svn.boost.org/trac10/ticket/653#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/653#comment:1</guid> <description> <p> Please also read the discussion at the Boost User mailing list, June 2007: "[integer] Request: long long (64 bits) support for int_t and uint_t" </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daryle Walker</dc:creator> <pubDate>Fri, 03 Aug 2007 10:45:15 GMT</pubDate> <title>component changed; severity set https://svn.boost.org/trac10/ticket/653#comment:2 https://svn.boost.org/trac10/ticket/653#comment:2 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">integer</span> </li> <li><strong>severity</strong> → <span class="trac-field-new">Problem</span> </li> </ul> Ticket Daryle Walker Mon, 27 Aug 2007 22:03:56 GMT attachment set https://svn.boost.org/trac10/ticket/653 https://svn.boost.org/trac10/ticket/653 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">longer_int_support.diff</span> </li> </ul> <p> The original diff from the <a class="missing wiki">SourceForge</a> version of this ticket </p> Ticket Daryle Walker Mon, 14 Jul 2008 06:28:58 GMT status, resolution changed https://svn.boost.org/trac10/ticket/653#comment:3 https://svn.boost.org/trac10/ticket/653#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/47414" title="Added extended-integer support, which fixes #653 (the main part; the ...">[47414]</a>) Added extended-integer support, which fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/653" title="#653: Patches: [integer] add support for integers longer than long (closed: fixed)">#653</a> (the main part; the secondary part is split off as <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1225" title="#1225: Feature Requests: Exact-sized Integer Type Selection Templates (closed: fixed)">#1225</a>) </p> Ticket anonymous Mon, 23 Nov 2009 09:44:12 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/653#comment:4 https://svn.boost.org/trac10/ticket/653#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Boost.Integer has been reverted to the last known good state - these fixes are no longer in Trunk (and were never released anyway). Reopened. </p> Ticket John Maddock Mon, 23 Nov 2009 18:51:35 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/653#comment:5 https://svn.boost.org/trac10/ticket/653#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/57873" title="Add support for long long throughout. Fixes #653.">[57873]</a>) Add support for long long throughout. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/653" title="#653: Patches: [integer] add support for integers longer than long (closed: fixed)">#653</a>. </p> Ticket