Boost C++ Libraries: Ticket #12944: wchar_t conflict for common_factor_rt.hpp in visual studio https://svn.boost.org/trac10/ticket/12944 <p> When attempting to use <code>common_factor.hpp</code> I ran into an error where <code>gcd_traits&lt;&gt;</code> had multiple explicit specializations for <code>unsigned short</code>. Upon further inspection I realised the vc runtime defines <code>wchar_t</code> as <code>typdef unsigned short wchar_t</code> when the option <code>-Zc:wchar_t (wchar_t Is Native Type)</code> is switched off. I had to patch the <code>common_factor.hpp</code> header in order to use this (since I do not want <code>wchar_t</code> to be a built-in type). Is there any other way around this? Am I misusing this interface? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12944 Trac 1.4.3 John Maddock Thu, 30 Mar 2017 18:38:43 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12944#comment:1 https://svn.boost.org/trac10/ticket/12944#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> </ul> <p> I've fixed this in <a class="ext-link" href="https://github.com/boostorg/math/commit/8c9709b31778c634eef095db63fc308dfbb5b68c"><span class="icon">​</span>https://github.com/boostorg/math/commit/8c9709b31778c634eef095db63fc308dfbb5b68c</a>. </p> <p> A quick workaround would be to use boost/integer/common_factor_rt.hpp and boost::integer::gcd instead. </p> Ticket lamar.moore@… Fri, 31 Mar 2017 08:48:32 GMT <link>https://svn.boost.org/trac10/ticket/12944#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12944#comment:2</guid> <description> <p> Thanks for the quick update </p> </description> <category>Ticket</category> </item> </channel> </rss>