Boost C++ Libraries: Ticket #12790: Left shift does not work on 32 bit Linux and MSVC 2015 (32 and 64 bits) https://svn.boost.org/trac10/ticket/12790 <p> The following test program creates an unsigned 160 bit unsigned integer with all bits set and shifts it by six bits to the left. </p> <p> On 64 bit Linux, the expected result (F...FC0) is returned. But on 32 bit Linux and MSVC 2015 (32 bit as well as 64 bit), the incorrect result (F...FC000000000) is returned. </p> <pre class="wiki">#include &lt;boost/multiprecision/cpp_int.hpp&gt; namespace mp = boost::multiprecision; using namespace std; typedef mp::number&lt;mp::cpp_int_backend&lt;20*8, 20*8, mp::unsigned_magnitude, mp::unchecked, void&gt; &gt; number_t; int main() { number_t n = -1; cout &lt;&lt; hex &lt;&lt; n &lt;&lt; endl; n = n &lt;&lt; 6; cout &lt;&lt; hex &lt;&lt; n &lt;&lt; endl; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12790 Trac 1.4.3 John Maddock Sun, 29 Jan 2017 19:21:23 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/12790#comment:1 https://svn.boost.org/trac10/ticket/12790#comment:1 <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">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.64.0</span> </li> </ul> <p> Fixed in <a class="ext-link" href="https://github.com/boostorg/multiprecision/commit/8179baf40fab18bfed22ef266c7b009d6d3de9e7"><span class="icon">​</span>https://github.com/boostorg/multiprecision/commit/8179baf40fab18bfed22ef266c7b009d6d3de9e7</a> </p> Ticket