Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:50:15

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
0004 // Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
0005 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
0006 
0007 // This file was modified by Oracle on 2020-2021.
0008 // Modifications copyright (c) 2020-2021 Oracle and/or its affiliates.
0009 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0010 
0011 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
0012 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
0013 
0014 // Use, modification and distribution is subject to the Boost Software License,
0015 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0016 // http://www.boost.org/LICENSE_1_0.txt)
0017 
0018 #ifndef BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_CHECK_HPP
0019 #define BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_CHECK_HPP
0020 
0021 
0022 #include <boost/concept_check.hpp>
0023 #include <boost/concept/requires.hpp>
0024 
0025 #include <boost/geometry/algorithms/detail/select_geometry_type.hpp>
0026 
0027 #include <boost/geometry/geometries/concepts/concept_type.hpp>
0028 #include <boost/geometry/geometries/concepts/box_concept.hpp>
0029 #include <boost/geometry/geometries/concepts/dynamic_geometry_concept.hpp>
0030 #include <boost/geometry/geometries/concepts/geometry_collection_concept.hpp>
0031 #include <boost/geometry/geometries/concepts/linestring_concept.hpp>
0032 #include <boost/geometry/geometries/concepts/multi_point_concept.hpp>
0033 #include <boost/geometry/geometries/concepts/multi_linestring_concept.hpp>
0034 #include <boost/geometry/geometries/concepts/multi_polygon_concept.hpp>
0035 #include <boost/geometry/geometries/concepts/point_concept.hpp>
0036 #include <boost/geometry/geometries/concepts/polygon_concept.hpp>
0037 #include <boost/geometry/geometries/concepts/ring_concept.hpp>
0038 #include <boost/geometry/geometries/concepts/segment_concept.hpp>
0039 
0040 
0041 namespace boost { namespace geometry { namespace concepts
0042 {
0043 
0044 /*!
0045     \brief Checks, in compile-time, the concept of any geometry
0046     \ingroup concepts
0047 */
0048 template <typename Geometry>
0049 // workaround for VS2015
0050 #if !defined(_MSC_VER) || (_MSC_VER >= 1910)
0051 constexpr
0052 #endif
0053 inline void check()
0054 {
0055     BOOST_CONCEPT_ASSERT((typename concept_type<Geometry>::type));
0056 }
0057 
0058 
0059 /*!
0060     \brief Checks, in compile-time, the concept of two geometries, and if they
0061         have equal dimensions
0062     \ingroup concepts
0063 */
0064 template <typename Geometry1, typename Geometry2>
0065 // workaround for VS2015
0066 #if !defined(_MSC_VER) || (_MSC_VER >= 1910)
0067 constexpr
0068 #endif
0069 inline void check_concepts_and_equal_dimensions()
0070 {
0071     check<Geometry1>();
0072     check<Geometry2>();
0073     assert_dimension_equal
0074         <
0075             typename geometry::detail::first_geometry_type<Geometry1>::type,
0076             typename geometry::detail::first_geometry_type<Geometry2>::type
0077         >();
0078 }
0079 
0080 
0081 }}} // namespace boost::geometry::concepts
0082 
0083 
0084 #endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_CHECK_HPP