summaryrefslogtreecommitdiff
path: root/boost/geometry/geometries/concepts/point_concept.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/geometries/concepts/point_concept.hpp')
-rw-r--r--boost/geometry/geometries/concepts/point_concept.hpp30
1 files changed, 23 insertions, 7 deletions
diff --git a/boost/geometry/geometries/concepts/point_concept.hpp b/boost/geometry/geometries/concepts/point_concept.hpp
index 1e1b31e61f..db49771129 100644
--- a/boost/geometry/geometries/concepts/point_concept.hpp
+++ b/boost/geometry/geometries/concepts/point_concept.hpp
@@ -1,8 +1,13 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
//
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
+// Copyright (c) 2008-2014 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
@@ -17,6 +22,7 @@
#include <cstddef>
#include <boost/concept_check.hpp>
+#include <boost/core/ignore_unused.hpp>
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/core/coordinate_dimension.hpp>
@@ -24,7 +30,6 @@
-
namespace boost { namespace geometry { namespace concept
{
@@ -46,6 +51,9 @@ The point concept is defined as following:
with two functions:
- \b get to get a coordinate value
- \b set to set a coordinate value (this one is not checked for ConstPoint)
+- for non-Cartesian coordinate systems, the coordinate system's units
+ must either be boost::geometry::degree or boost::geometry::radian
+
\par Example:
@@ -90,8 +98,12 @@ class Point
typedef typename coordinate_type<Geometry>::type ctype;
typedef typename coordinate_system<Geometry>::type csystem;
- enum { ccount = dimension<Geometry>::value };
+ // The following enum is used to fully instantiate the coordinate
+ // system class; this is needed in order to check the units passed
+ // to it for non-Cartesian coordinate systems.
+ enum { cs_check = sizeof(csystem) };
+ enum { ccount = dimension<Geometry>::value };
template <typename P, std::size_t Dimension, std::size_t DimensionCount>
struct dimension_checker
@@ -139,8 +151,12 @@ class ConstPoint
typedef typename coordinate_type<Geometry>::type ctype;
typedef typename coordinate_system<Geometry>::type csystem;
- enum { ccount = dimension<Geometry>::value };
+ // The following enum is used to fully instantiate the coordinate
+ // system class; this is needed in order to check the units passed
+ // to it for non-Cartesian coordinate systems.
+ enum { cs_check = sizeof(csystem) };
+ enum { ccount = dimension<Geometry>::value };
template <typename P, std::size_t Dimension, std::size_t DimensionCount>
struct dimension_checker
@@ -149,7 +165,7 @@ class ConstPoint
{
const P* p = 0;
ctype coord(geometry::get<Dimension>(*p));
- boost::ignore_unused_variable_warning(coord);
+ boost::ignore_unused(coord);
dimension_checker<P, Dimension+1, DimensionCount>::apply();
}
};