Boost C++ Libraries: Ticket #3035: non-standard integral types not fully supported https://svn.boost.org/trac10/ticket/3035 <p> It looks only integral_promotion.hpp and is_integral.hpp are aware of non-standard integral types like __int64, while make_unsigned, is_unsigned, make_signed, and is_signed are not. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3035 Trac 1.4.3 Maxim Yanchenko <Maxim.Yanchenko@…> Fri, 15 May 2009 08:22:45 GMT <link>https://svn.boost.org/trac10/ticket/3035#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3035#comment:1</guid> <description> <p> Well, __int64 is a bad example being an exceptional case, I actually meant the whole list of __int8, __int16 etc </p> </description> <category>Ticket</category> </item> <item> <dc:creator>nasonov</dc:creator> <pubDate>Fri, 15 May 2009 11:39:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3035#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3035#comment:2</guid> <description> <p> I added a TODO to the integral_promotion.hpp some time ago which says "common macro for this #if. Or better yet, PP SEQ of non-standard types." </p> <p> So, if we define BOOST_TT_AUX_NON_STANDARD_INTS: </p> <pre class="wiki">#if (defined(BOOST_MSVC) &amp;&amp; (BOOST_MSVC &lt; 1300)) \ || (defined(BOOST_INTEL_CXX_VERSION) &amp;&amp; defined(_MSC_VER) &amp;&amp; (BOOST_INTEL_CXX_VERSION &lt;= 600))) # define BOOST_TT_AUX_NON_STANDARD_INTS \ (__int8) (unsigned __int8) \ (__int16)(unsigned __int16) \ (__int32)(unsigned __int32) #elif defined(__BORLANDC__) &amp;&amp; (__BORLANDC__ == 0x600) &amp;&amp; (_MSC_VER &lt; 1300) # define BOOST_TT_AUX_NON_STANDARD_INTS \ (__int8) (unsigned __int8) \ (__int16)(unsigned __int16) \ (__int32)(unsigned __int32) \ (__int64)(unsigned __int64) #endif </pre><p> we should be able to change code in is_integral.hpp to something like: </p> <pre class="wiki">#ifdef BOOST_TT_AUX_NON_STANDARD_INTS #define BOOST_TT_AUX_DECL(r, data, type) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral, type, true) BOOST_PP_SEQ_FOR_EACH(BOOST_TT_AUX_DECL, _, BOOST_TT_AUX_NON_STANDARD_INTS) #undef BOOST_TT_AUX_DECL #endif </pre><p> and similarly in integral_promotion.hpp: </p> <pre class="wiki">#ifdef BOOST_TT_AUX_NON_STANDARD_INTS #define BOOST_TT_AUX_DECL(r, data, type) BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(type) BOOST_PP_SEQ_FOR_EACH(BOOST_TT_AUX_DECL, _, BOOST_TT_AUX_NON_STANDARD_INTS) #undef BOOST_TT_AUX_DECL #endif </pre><p> It's not as easy for make_signed and make_unsigned but they convert a non-standard type to a corrensponding standard type, e.g. make_unsigned&lt;<span class="underline">int8&gt;::type -&gt; unsigned char. </span></p> <p> This macro can be also used in tests. </p> <p> Alex </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Fri, 15 May 2009 16:52:44 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3035#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3035#comment:3</guid> <description> <p> A couple of points here: </p> <p> 1) This is only an issue for obsolete MSVC versions that treat <span class="underline">int8 etc as distinct types right? 2) I'm fairly sure looking at the code that is_unsigned/is_signed/make_signed/make_unsigned should all support these types already. ie no special code is needed as long as is_integral recognises the type as an integral type. 3) I don't currently have a compiler installed that can test the above :-( </span></p> <p> So... can someone please tese the above? </p> <p> Or if the submitter is unable to confirm this is an issue, I suggest we just close the issue down with an "invalid" tag. </p> <p> Regards, John. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Tue, 04 Aug 2009 16:16:08 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3035#comment:4 https://svn.boost.org/trac10/ticket/3035#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> Closing as invalid: I believe this is a non-issue for all except obsolete compilers. </p> Ticket