Boost C++ Libraries: Ticket #7492: add support of libc++ https://svn.boost.org/trac10/ticket/7492 <p> Without this change I get compilation error </p> <pre class="wiki">In file included from helmholtz/base/kom/green_func/green_func_helmholtz.cpp:1: In file included from helmholtz/base/kom/green_func/green_func_helmholtz.hpp:7: In file included from helmholtz/base/kom/fund_sol/fund_sol_helmholtz.hpp:6: In file included from base/base/kom/base/special_functions.hpp:9: In file included from base/base/kom/base/special_functions_ooura.hpp:4: In file included from third_party/boost/boost/math/special_functions/bessel.hpp:17: In file included from third_party/boost/boost/math/special_functions/detail/bessel_jy.hpp:14: In file included from third_party/boost/boost/math/special_functions/gamma.hpp:37: In file included from third_party/boost/boost/math/special_functions/powm1.hpp:14: third_party/boost/boost/math/special_functions/expm1.hpp:308:64: error: implicit conversion loses floating-point precision: 'double' to 'float' [-Werror,-Wconversion] inline float expm1(float x, const policies::policy&lt;&gt;&amp;){ return ::expm1(x); } ~~~~~~ ^~~~~~~~~~ 2 errors generated. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7492 Trac 1.4.3 vvavrychuk@… Wed, 10 Oct 2012 18:09:12 GMT <link>https://svn.boost.org/trac10/ticket/7492#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7492#comment:1</guid> <description> <p> Patch is </p> <pre class="wiki">From 69e657661b5d617b189667adf015346821c7297b Mon Sep 17 00:00:00 2001 From: Vasyl Vavrychuk &lt;vvavrychuk@gmail.com&gt; Date: Wed, 10 Oct 2012 20:57:50 +0300 Subject: [PATCH] Boost.Math: support libcxx Fixed compilation with libc++. --- boost/math/tools/config.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boost/math/tools/config.hpp b/boost/math/tools/config.hpp index 907d693..3742ae0 100644 --- a/boost/math/tools/config.hpp +++ b/boost/math/tools/config.hpp @@ -99,6 +99,10 @@ # define BOOST_MATH_USE_C99 #endif +#if defined(_LIBCPP_VERSION) +# define BOOST_MATH_USE_C99 +#endif + #if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \ || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \ || (defined(__GNUC__) &amp;&amp; !defined(BOOST_MATH_USE_C99)) -- 1.7.11.4 </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Thu, 29 Nov 2012 12:10:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7492#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7492#comment:2</guid> <description> <p> I'm not sure that's quite the correct fix - can we guarantee that libc++ always implies the C99 math functions are available? I suspect it would be better to check the platform (what is the platform BTW)? </p> <p> In the mean time I'll add a static_cast so you don't get the implicit-conversion warnings/errors. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Thu, 29 Nov 2012 13:27:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7492#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7492#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/81624" title="Lots of small patches. Update and regenerate docs. Fixes #7183. Fixes ...">[81624]</a>) Lots of small patches. Update and regenerate docs. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7183" title="#7183: Bugs: math::isinf compilation failure on FBSD (closed: fixed)">#7183</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7290" title="#7290: Bugs: complex acos is occasionally wrong (closed: fixed)">#7290</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7291" title="#7291: Bugs: complex atan is not the best it could be (closed: fixed)">#7291</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7649" title="#7649: Bugs: Minor comment typo in boost/math/constants/calculate_constants.hpp (closed: fixed)">#7649</a>. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7492" title="#7492: Bugs: add support of libc++ (closed: fixed)">#7492</a>. </p> </description> <category>Ticket</category> </item> <item> <author>vvavrychuk@…</author> <pubDate>Thu, 29 Nov 2012 14:46:23 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7492#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7492#comment:4</guid> <description> <p> Yes, libc++ has always C99 math functions enabled. </p> <p> See llvm.org/viewvc/llvm-project/libcxx/trunk/include/cmath?view=markup </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Thu, 29 Nov 2012 16:39:57 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7492#comment:5 https://svn.boost.org/trac10/ticket/7492#comment:5 <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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/81625" title="Enable use of C99 functions on libc++. Fixes #7492.">[81625]</a>) Enable use of C99 functions on libc++. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7492" title="#7492: Bugs: add support of libc++ (closed: fixed)">#7492</a>. </p> Ticket