Boost C++ Libraries: Ticket #6052: unqualified sqrt() fails with SunCC https://svn.boost.org/trac10/ticket/6052 <p> polygon/gtl_boost_unit_test fails to compile with SunCC </p> <pre class="wiki">] sunCC -library=stlport4 -I. libs/polygon/test/gtl_boost_unit_test.cpp ... "./boost/polygon/rectangle_concept.hpp", line 934: Error: The function "sqrt" must have a prototype. "libs/polygon/test/gtl_boost_unit_test.cpp", line 794: Where: While instantiating "boost::polygon::euclidean_distance&lt;boost::polygon::rectangle_data&lt;int&gt;, boost::polygon::rectangle_data&lt;int&gt;&gt;(const boost:: "libs/polygon/test/gtl_boost_unit_test.cpp", line 794: Where: Instantiated from non-template code. ... ] </pre><p> Polygon sources use quite a number of unqualified sqrt() calls. However the standard header they include - <strong><code>&lt;cmath&gt;</code></strong> - is not required to inject math functions into the global namespace. Thus the only standard way to use these functions (sqrt included) is via std:: namespace. </p> <p> All the uses of sqrt should be converted to std::sqrt, otherwise compilers with strictly conforming STLs (like SunCC -stlport4) will not be able to compile. </p> <p> (suggested patch attached) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6052 Trac 1.4.3 Fedor Sergeev <Fedor.Sergeev@…> Mon, 24 Oct 2011 19:03:07 GMT attachment set https://svn.boost.org/trac10/ticket/6052 https://svn.boost.org/trac10/ticket/6052 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">diffs</span> </li> </ul> <p> patch for std::sqrt </p> Ticket sydorchuk.andriy@… Mon, 17 Sep 2012 22:05:19 GMT <link>https://svn.boost.org/trac10/ticket/6052#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6052#comment:1</guid> <description> <p> Will be fixed in Boost 1.52. </p> <p> Andrii Sydorchuk </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Lucanus Simonson</dc:creator> <pubDate>Wed, 19 Sep 2012 00:36:31 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6052#comment:2 https://svn.boost.org/trac10/ticket/6052#comment:2 <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> Ticket