Math.hxx: move cmath include out of define
The _GLIBCXX_USE_C99_MATH macro is defined in glibcxx by c++config.h, which
gets included by every header. Which means a header needs to be present.
(cherry picked from commit 79e9aff338
)
This commit is contained in:
parent
5ccfcffcc1
commit
6080c3b4ba
@ -30,11 +30,16 @@
|
|||||||
#ifndef MATH_HXX
|
#ifndef MATH_HXX
|
||||||
#define MATH_HXX
|
#define MATH_HXX
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* C99 math can be optionally omitted with gcc's libstdc++.
|
||||||
|
* Use boost if unavailable.
|
||||||
|
*/
|
||||||
#if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) && !defined(_GLIBCXX_USE_C99_MATH)
|
#if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) && !defined(_GLIBCXX_USE_C99_MATH)
|
||||||
#include <boost/math/special_functions/round.hpp>
|
#include <boost/math/special_functions/round.hpp>
|
||||||
using boost::math::lround;
|
using boost::math::lround;
|
||||||
#else
|
#else
|
||||||
#include <cmath>
|
|
||||||
using std::lround;
|
using std::lround;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user