Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68240 - trunk/libs/geometry/example
From: barend.gehrels_at_[hidden]
Date: 2011-01-18 13:57:47


Author: barendgehrels
Date: 2011-01-18 13:57:46 EST (Tue, 18 Jan 2011)
New Revision: 68240
URL: http://svn.boost.org/trac/boost/changeset/68240

Log:
Added Boost.Fusion points adapted to Boost.Geometry (effectively by Akira Takahashi)

Text files modified:
   trunk/libs/geometry/example/c09_custom_fusion_example.cpp | 21 +++++++++++----------
   1 files changed, 11 insertions(+), 10 deletions(-)

Modified: trunk/libs/geometry/example/c09_custom_fusion_example.cpp
==============================================================================
--- trunk/libs/geometry/example/c09_custom_fusion_example.cpp (original)
+++ trunk/libs/geometry/example/c09_custom_fusion_example.cpp 2011-01-18 13:57:46 EST (Tue, 18 Jan 2011)
@@ -1,6 +1,7 @@
 // Boost.Geometry (aka GGL, Generic Geometry Library)
 //
-// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands
+// Copyright Barend Gehrels 2011, Geodan, Amsterdam, the Netherlands
+// Copyright Akira Takahashi 2011
 // Use, modification and distribution is subject to the Boost Software License,
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
@@ -27,7 +28,7 @@
 };
 
 
-BOOST_FUSION_ADAPT_STRUCT(my_2d,
+BOOST_FUSION_ADAPT_STRUCT(my_2d,
     (float, x)
     (float, y))
 
@@ -37,22 +38,22 @@
     my_2d p1 = {1, 5};
     my_2d p2 = {3, 4};
 
- std::cout << "Coordinate using direct access: "
+ std::cout << "Coordinate using direct access: "
         << p1.x
         << std::endl;
- std::cout << "Coordinate using Boost.Fusion: "
- << boost::fusion::at_c<0>(p1)
+ std::cout << "Coordinate using Boost.Fusion: "
+ << boost::fusion::at_c<0>(p1)
         << std::endl;
- std::cout << "Coordinate using Boost.Geometry: "
- << boost::geometry::get<0>(p1)
+ std::cout << "Coordinate using Boost.Geometry: "
+ << boost::geometry::get<0>(p1)
         << std::endl;
 
- std::cout << "Two points are: "
+ std::cout << "Two points are: "
         << boost::geometry::dsv(p1) << " "
         << boost::geometry::dsv(p2) << std::endl;
 
- std::cout << "Distance: "
- << boost::geometry::distance(p1, p2)
+ std::cout << "Distance: "
+ << boost::geometry::distance(p1, p2)
         << std::endl;
 
     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