Boost C++ Libraries: Ticket #11594: mpl/test/string.cpp fails, test needs to take into account endianness. https://svn.boost.org/trac10/ticket/11594 <p> Compiling mpl/test/string.cpp with Oracle Solaris Studio 12.4 on sparc-S2 platform, the test fails as follows: % CC -compat=5 -library=stlport4 -xO4 -mt -erroff=%none -m64 -KPIC -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I.. -c -o ./string.o ../libs/mpl/test/string.cpp "../libs/mpl/test/string.cpp", line 66: Warning: Multi-character character literal 'aaaa'. "../libs/mpl/test/string.cpp", line 66: Warning: Multi-character character literal 'aaaa'. ... ... "../libs/mpl/test/string.cpp", line 140: Error: Formal argument 1 of type mpl_::assert&lt;0&gt; in call to mpl_::assertion_failed&lt;0&gt;(mpl_::assert&lt;0&gt;) is being passed mpl_::failed<strong></strong><strong></strong><strong></strong>boost::is_same&lt;boost::mpl::string&lt;25185, 0, 0, 0, 0, 0, 0, 0&gt;, boost::mpl::string&lt;24930, 0, 0, 0, 0, 0, 0, 0&gt;&gt;::<strong></strong><strong></strong><strong></strong>. "../libs/mpl/test/string.cpp", line 143: Error: Formal argument 1 of type mpl_::assert&lt;0&gt; in call to mpl_::assertion_failed&lt;0&gt;(mpl_::assert&lt;0&gt;) is being passed mpl_::failed<strong></strong><strong></strong><strong></strong>boost::is_same&lt;boost::mpl::string&lt;6513249, 0, 0, 0, 0, 0, 0, 0&gt;, boost::mpl::string&lt;6382179, 0, 0, 0, 0, 0, 0, 0&gt;&gt;::<strong></strong><strong></strong><strong></strong>. "../libs/mpl/test/string.cpp", line 146: Error: Formal argument 1 of type mpl_::assert&lt;0&gt; in call to mpl_::assertion_failed&lt;0&gt;(mpl_::assert&lt;0&gt;) is being passed mpl_::failed<strong></strong><strong></strong><strong></strong>boost::is_same&lt;boost::mpl::string&lt;1684234849, 0, 0, 0, 0, 0, 0, 0&gt;, boost::mpl::string&lt;1633837924, 0, 0, 0, 0, 0, 0, 0&gt;&gt;::<strong></strong><strong></strong><strong></strong>. "../libs/mpl/test/string.cpp", line 149: Error: Formal argument 1 of type mpl_::assert&lt;0&gt; in call to mpl_::assertion_failed&lt;0&gt;(mpl_::assert&lt;0&gt;) is being passed mpl_::failed<strong></strong><strong></strong><strong></strong>boost::is_same&lt;boost::mpl::string&lt;1684234849, 101, 0, 0, 0, 0, 0, 0&gt;, boost::mpl::string&lt;1633837924, 101, 0, 0, 0, 0, 0, 0&gt;&gt;::<strong></strong><strong></strong><strong></strong>. ... "../libs/mpl/test/string.cpp", line 319: Error: Formal argument 1 of type mpl_::assert&lt;0&gt; in call to mpl_::assertion_failed&lt;0&gt;(mpl_::assert&lt;0&gt;) is being passed mpl_::failed<strong></strong><strong></strong><strong></strong>boost::is_same&lt;boost::mpl::string&lt;1633771864, 1633771873, 1633771873, 1633771873, 1633771873, 1633771873, 1633771873, 1633771873&gt;, boost::mpl::string&lt;1482776929, 1633771873, 1633771873, 1633771873, 1633771873, 1633771873, 1633771873, 1633771873&gt;&gt;::<strong></strong><strong></strong><strong></strong>. "../libs/mpl/test/string.cpp", line 321: Warning: Multi-character character literal 'aaaa'. "../libs/mpl/test/string.cpp", line 323: Error: Formal argument 1 of type mpl_::assert&lt;0&gt; in call to mpl_::assertion_failed&lt;0&gt;(mpl_::assert&lt;0&gt;) is being passed mpl_::failed<strong></strong><strong></strong><strong></strong>boost::is_same&lt;boost::mpl::string&lt;1633771864, 1633771873, 1633771873, 0, 0, 0, 0, 0&gt;, boost::mpl::string&lt;1482776929, 1633771873, 1633771873, 0, 0, 0, 0, 0&gt;&gt;::<strong></strong><strong></strong><strong></strong>. Compilation aborted, too many Error messages. % </p> <p> In boost/mpl/string.hpp: </p> <blockquote> <p> #if defined(BOOST_ENDIAN_LITTLE_BYTE) &amp;&amp; defined(<span class="underline">SUNPRO_CC) ... #else ... </span></p> </blockquote> <p> condition should be fixed to correctly detect endiannes. </p> <p> The following change causes the testcase to compile. diff string.hpp string.hpp_new 62c62 &lt; #if defined(BOOST_ENDIAN_LITTLE_BYTE) &amp;&amp; defined(<span class="underline">SUNPRO_CC) --- </span></p> <blockquote class="citation"> <blockquote> <p> #if BOOST_ENDIAN_LITTLE_BYTE &amp;&amp; defined(<span class="underline">SUNPRO_CC) </span></p> </blockquote> </blockquote> <p> With this change, the result is: CC -compat=5 -library=stlport4 -xO4 -mt -erroff=%none -m64 -KPIC -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I.. -c -o ./string.o ../libs/mpl/test/string.cpp "../libs/mpl/test/string.cpp", line 66: Warning: Multi-character character literal 'aaaa'. ... "../libs/mpl/test/string.cpp", line 363: Warning: Multi-character character literal 'el'. 72 Warning(s) detected. % </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11594 Trac 1.4.3 Aparna Kumta <aparna.kumta@…> Thu, 27 Aug 2015 17:40:26 GMT <link>https://svn.boost.org/trac10/ticket/11594#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11594#comment:1</guid> <description> <p> PR <a class="ext-link" href="https://github.com/boostorg/mpl/pull/22"><span class="icon">​</span>https://github.com/boostorg/mpl/pull/22</a> is submitted. Thanks. </p> </description> <category>Ticket</category> </item> </channel> </rss>