Modify ↓

# Ticket #7492 (closed Bugs: fixed)

## add support of libc++

Reported by: | vvavrychuk@… | Owned by: | johnmaddock |
---|---|---|---|

Milestone: | To Be Determined | Component: | math |

Version: | Boost 1.52.0 | Severity: | Problem |

Keywords: | Cc: |

### Description

Without this change I get compilation error

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<>&){ return ::expm1(x); } ~~~~~~ ^~~~~~~~~~ 2 errors generated.

## Attachments

## Change History

### comment:2 Changed 3 years ago by johnmaddock

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)?

In the mean time I'll add a static_cast so you don't get the implicit-conversion warnings/errors.

**Note:**See TracTickets for help on using tickets.

Patch is