|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69341 - trunk/libs/geometry/doc/src/examples/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-02-27 12:46:18
Author: barendgehrels
Date: 2011-02-27 12:46:15 EST (Sun, 27 Feb 2011)
New Revision: 69341
URL: http://svn.boost.org/trac/boost/changeset/69341
Log:
ifdefed ttmath for Linux, on assign_2d_point.cpp
Text files modified:
trunk/libs/geometry/doc/src/examples/algorithms/assign_2d_point.cpp | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
Modified: trunk/libs/geometry/doc/src/examples/algorithms/assign_2d_point.cpp
==============================================================================
--- trunk/libs/geometry/doc/src/examples/algorithms/assign_2d_point.cpp (original)
+++ trunk/libs/geometry/doc/src/examples/algorithms/assign_2d_point.cpp 2011-02-27 12:46:15 EST (Sun, 27 Feb 2011)
@@ -15,7 +15,10 @@
#include <boost/geometry/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+
+#if defined(_MSC_VER)
+# include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
+#endif
int main()
@@ -26,16 +29,21 @@
boost::geometry::model::d2::point_xy<double> p1;
assign(p1, 1.2345, 2.3456);
+#if defined(_MSC_VER)
boost::geometry::model::d2::point_xy<ttmath::Big<1,4> > p2;
assign(p2, "1.2345", "2.3456"); /*< It is possible to assign coordinates with other types than the coordinate type.
For ttmath, you can e.g. conveniently use strings. The advantage is that it then has higher precision, because
if doubles are used for assignments the double-precision is used.
>*/
+#endif
std::cout
<< std::setprecision(20)
<< boost::geometry::dsv(p1) << std::endl
- << boost::geometry::dsv(p2) << std::endl;
+#if defined(_MSC_VER)
+ << boost::geometry::dsv(p2) << std::endl
+#endif
+ ;
return 0;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk