std::trunc is not available with g++-4.8 on android (and also likely not msvc)
This commit is contained in:
parent
8dcf5aa622
commit
535c580829
2 changed files with 3 additions and 2 deletions
|
@ -39,7 +39,7 @@
|
|||
#include <boost/spirit/include/phoenix_function.hpp>
|
||||
#include <boost/spirit/include/phoenix_statement.hpp>
|
||||
#include <boost/fusion/include/boost_tuple.hpp>
|
||||
#include <boost/math/special_functions/trunc.hpp> // for vc++
|
||||
#include <boost/math/special_functions/trunc.hpp> // for vc++ and android whose c++11 libs lack std::trunct
|
||||
|
||||
namespace boost { namespace spirit { namespace traits {
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include <boost/spirit/include/phoenix_statement.hpp>
|
||||
#include <boost/fusion/include/boost_tuple.hpp>
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
#include <boost/math/special_functions/trunc.hpp> // for vc++ and android whose c++11 libs lack std::trunct
|
||||
|
||||
namespace boost { namespace spirit { namespace traits {
|
||||
|
||||
|
@ -147,7 +148,7 @@ struct wkt_coordinate_policy : karma::real_policies<T>
|
|||
{
|
||||
if (n == 0.0) return 0;
|
||||
using namespace boost::spirit;
|
||||
return static_cast<unsigned>(14 - std::trunc(std::log10(traits::get_absolute_value(n))));
|
||||
return static_cast<unsigned>(14 - boost::math::trunc(log10(traits::get_absolute_value(n))));
|
||||
}
|
||||
|
||||
template <typename OutputIterator>
|
||||
|
|
Loading…
Add table
Reference in a new issue