From d4bcf8dcc8ec67fa3be32ba9ae18685e0232a37f Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 17 Apr 2014 12:09:07 +0200 Subject: [PATCH] [iterators][relate] Fix Intel 11 compilation errors. --- .../algorithms/detail/relate/result.hpp | 4 +- .../iterators/concatenate_iterator.hpp | 23 +++++++--- .../geometry/iterators/flatten_iterator.hpp | 46 +++++++++++-------- .../geometry/iterators/point_iterator.hpp | 17 ++++--- 4 files changed, 57 insertions(+), 33 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/relate/result.hpp b/include/boost/geometry/algorithms/detail/relate/result.hpp index a4f571f94..df66da6d5 100644 --- a/include/boost/geometry/algorithms/detail/relate/result.hpp +++ b/include/boost/geometry/algorithms/detail/relate/result.hpp @@ -468,7 +468,7 @@ struct check_dispatch< boost::tuple > template static inline bool apply(mask_type const& mask, Matrix const& matrix) { - return check_dispatch_tuple::template apply(mask, matrix); + return check_dispatch_tuple::apply(mask, matrix); } }; @@ -480,7 +480,7 @@ struct check_dispatch< boost::tuples::cons > template static inline bool apply(mask_type const& mask, Matrix const& matrix) { - return check_dispatch_tuple::template apply(mask, matrix); + return check_dispatch_tuple::apply(mask, matrix); } }; diff --git a/include/boost/geometry/iterators/concatenate_iterator.hpp b/include/boost/geometry/iterators/concatenate_iterator.hpp index 833dd05e5..e7a849769 100644 --- a/include/boost/geometry/iterators/concatenate_iterator.hpp +++ b/include/boost/geometry/iterators/concatenate_iterator.hpp @@ -11,7 +11,8 @@ #define BOOST_GEOMETRY_ITERATORS_CONCATENATE_ITERATOR_HPP #include -#include +#include +#include #include #include #include @@ -58,18 +59,26 @@ public: (concatenate_iterator const& other) : m_it1(other.m_it1), m_end1(other.m_end1), m_it2(other.m_it2) { - BOOST_STATIC_ASSERT - ( boost::is_convertible::value - && boost::is_convertible::value ); + static const bool are_conv + = boost::is_convertible::value + && boost::is_convertible::value; + + BOOST_MPL_ASSERT_MSG((are_conv), + NOT_CONVERTIBLE, + (types)); } template concatenate_iterator operator=(concatenate_iterator const& other) { - BOOST_STATIC_ASSERT - ( boost::is_convertible::value - && boost::is_convertible::value ); + static const bool are_conv + = boost::is_convertible::value + && boost::is_convertible::value; + + BOOST_MPL_ASSERT_MSG((are_conv), + NOT_CONVERTIBLE, + (types)); m_it1 = other.m_it1; m_end1 = other.m_end1; diff --git a/include/boost/geometry/iterators/flatten_iterator.hpp b/include/boost/geometry/iterators/flatten_iterator.hpp index 69d9d3484..b9a9e532e 100644 --- a/include/boost/geometry/iterators/flatten_iterator.hpp +++ b/include/boost/geometry/iterators/flatten_iterator.hpp @@ -11,7 +11,8 @@ #define BOOST_GEOMETRY_ITERATORS_FLATTEN_ITERATOR_HPP #include -#include +#include +#include #include #include #include @@ -85,15 +86,19 @@ public: m_outer_end(other.m_outer_end), m_inner_it(other.m_inner_it) { - BOOST_STATIC_ASSERT( boost::is_convertible - < - OtherOuterIterator, OuterIterator - >::value - && boost::is_convertible - < - OtherInnerIterator, InnerIterator - >::value ); - + static const bool are_conv + = boost::is_convertible + < + OtherOuterIterator, OuterIterator + >::value + && boost::is_convertible + < + OtherInnerIterator, InnerIterator + >::value; + + BOOST_MPL_ASSERT_MSG((are_conv), + NOT_CONVERTIBLE, + (types)); } template @@ -113,14 +118,19 @@ public: OtherAccessInnerEnd > const& other) { - BOOST_STATIC_ASSERT( boost::is_convertible - < - OtherOuterIterator, OuterIterator - >::value - && boost::is_convertible - < - OtherInnerIterator, InnerIterator - >::value ); + static const bool are_conv + = boost::is_convertible + < + OtherOuterIterator, OuterIterator + >::value + && boost::is_convertible + < + OtherInnerIterator, InnerIterator + >::value; + + BOOST_MPL_ASSERT_MSG((are_conv), + NOT_CONVERTIBLE, + (types)); m_outer_it = other.m_outer_it; m_outer_end = other.m_outer_end; diff --git a/include/boost/geometry/iterators/point_iterator.hpp b/include/boost/geometry/iterators/point_iterator.hpp index cdeb25d96..660cc03fa 100644 --- a/include/boost/geometry/iterators/point_iterator.hpp +++ b/include/boost/geometry/iterators/point_iterator.hpp @@ -10,6 +10,8 @@ #ifndef BOOST_GEOMETRY_ITERATORS_POINT_ITERATOR_HPP #define BOOST_GEOMETRY_ITERATORS_POINT_ITERATOR_HPP +#include +#include #include #include @@ -241,12 +243,15 @@ public: point_iterator(point_iterator const& other) : base(*other.base_ptr()) { - BOOST_STATIC_ASSERT - ( boost::is_convertible - < - typename dispatch::point_iterator_type::type, - typename dispatch::point_iterator_type::type - >::value ); + static const bool is_conv + = boost::is_convertible< + typename dispatch::point_iterator_type::type, + typename dispatch::point_iterator_type::type + >::value; + + BOOST_MPL_ASSERT_MSG((is_conv), + NOT_CONVERTIBLE, + (point_iterator)); } };