+ revert to using boost::math::trunc
+ and mapnik::noncopyable vc++ (*) doesn't support std::trunc and deleting methods in class/struct definition * - vc++ 2012 November CTP
This commit is contained in:
parent
abd42357d6
commit
95e3c87f05
3 changed files with 10 additions and 11 deletions
|
@ -40,6 +40,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++
|
||||
|
||||
namespace boost { namespace spirit { namespace traits {
|
||||
|
||||
|
@ -114,7 +115,7 @@ struct json_coordinate_policy : karma::real_policies<T>
|
|||
{
|
||||
if (n == 0.0) return 0;
|
||||
using namespace boost::spirit;
|
||||
return static_cast<unsigned>(14 - std::trunc(log10(traits::get_absolute_value(n))));
|
||||
return static_cast<unsigned>(14 - boost::math::trunc(log10(traits::get_absolute_value(n))));
|
||||
}
|
||||
|
||||
template <typename OutputIterator>
|
||||
|
|
|
@ -26,18 +26,19 @@
|
|||
// mapnik
|
||||
#include <mapnik/rule.hpp>
|
||||
#include <mapnik/feature_type_style.hpp>
|
||||
|
||||
#include <mapnik/noncopyable.hpp>
|
||||
// stl
|
||||
#include <vector>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
class rule_cache
|
||||
class rule_cache : private noncopyable
|
||||
{
|
||||
private:
|
||||
rule_cache(rule_cache const& other) = delete; // no copy ctor
|
||||
rule_cache& operator=(rule_cache const& other) = delete; // no assignment op
|
||||
//latest MS compiler (VC++ 2012 november CTP) doesn't support deleting functions
|
||||
//rule_cache(rule_cache const& other) = delete; // no copy ctor
|
||||
//rule_cache& operator=(rule_cache const& other) = delete; // no assignment op
|
||||
public:
|
||||
typedef std::vector<rule const*> rule_ptrs;
|
||||
rule_cache()
|
||||
|
|
|
@ -42,9 +42,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> // trunc to avoid needing C++11
|
||||
|
||||
#include <boost/math/special_functions/trunc.hpp> // for vc++
|
||||
|
||||
namespace boost { namespace spirit { namespace traits {
|
||||
|
||||
|
@ -153,9 +151,8 @@ struct wkt_coordinate_policy : karma::real_policies<T>
|
|||
static unsigned precision(T n)
|
||||
{
|
||||
if (n == 0.0) return 0;
|
||||
return 6;
|
||||
//using namespace boost::spirit; // for traits
|
||||
//return std::max(6u, static_cast<unsigned>(15 - boost::math::trunc(log10(traits::get_absolute_value(n)))));
|
||||
using namespace boost::spirit;
|
||||
return static_cast<unsigned>(14 - boost::math::trunc(std::log10(traits::get_absolute_value(n))));
|
||||
}
|
||||
|
||||
template <typename OutputIterator>
|
||||
|
|
Loading…
Add table
Reference in a new issue