2011-10-12 122 views
0

(从早期问题中分离出来)。boost :: geometry :: area无法在intel编译器上编译

有人知道这里发生了什么吗?以下代码在MSVC中正常工作,但在intel编译器中不起作用。

//code to calculate area of convex hull from a set of points 

#include <boost/geometry.hpp> 
#include <boost/geometry/geometries/point_xy.hpp> 
#include <boost/geometry/geometries/polygon.hpp> 
#include <boost/geometry/multi/geometries/multi_point.hpp> 

double convex_hull_area() 
{ 
    using boost::geometry::model::d2::point_xy; 
    using boost::geometry::append; 
    using boost::geometry::make; 

    //this bit works if I use a polygon instead of multi_point 
    boost::geometry::model::polygon<point_xy<float> > all_points_in_radius; 

    append(all_points_in_radius,make<point_xy<float> >(0,0)); 
    append(all_points_in_radius,make<point_xy<float> >(3,0)); 
    append(all_points_in_radius,make<point_xy<float> >(3,3)); 
    append(all_points_in_radius,make<point_xy<float> >(2,1)); 

    boost::geometry::model::polygon<point_xy<float> > hull; 
    boost::geometry::convex_hull(all_points_in_radius,hull); 
    return boost::geometry::area(hull); 
} 

最后一行(升压::几何::区域)是产生的问题之一:

1>d:\boost\boost_1_47_0\boost/typeof/encode_decode.hpp(50): error: incomplete type is not allowed 
1>  struct encode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_type_impl<V, T> 
1>       ^
1>   detected during: 
1>   instantiation of class "boost::type_of::encode_type<V, T> [with V=boost::type_of::vector2<boost::mpl::size_t<65592U>, boost::mpl::size_t<65589U>>, T=boost::geometry::model::ring<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, 1, 1, stlp_std::vector, stlp_std::allocator>]" at line 53 of "d:\boost\boost_1_47_0\boost/typeof/modifiers.hpp" 
1>   instantiation of class "<unnamed>::boost_typeof::encode_type_impl<V, const T> [with V=boost::type_of::vector1<boost::mpl::size_t<65592U>>, T=boost::geometry::model::ring<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, 1, 1, stlp_std::vector, stlp_std::allocator>]" at line 50 
1>   instantiation of class "boost::type_of::encode_type<V, T> [with V=boost::type_of::vector1<boost::mpl::size_t<65592U>>, T=const boost::geometry::model::ring<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, 1, 1, stlp_std::vector, stlp_std::allocator>]" at line 56 of "d:\boost\boost_1_47_0\boost/typeof/modifiers.hpp" 
1>   instantiation of class "<unnamed>::boost_typeof::encode_type_impl<V, T *> [with V=boost::type_of::vector0<void>, T=const boost::geometry::model::ring<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, 1, 1, stlp_std::vector, stlp_std::allocator>]" at line 50 
1>   instantiation of class "boost::type_of::encode_type<V, T> [with V=boost::type_of::vector0<void>, T=const boost::geometry::model::ring<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, 1, 1, stlp_std::vector, stlp_std::allocator> *]" at line 42 of "d:\boost\boost_1_47_0\boost/geometry/algorithms/detail/calculate_sum.hpp" 
1>   instantiation of "ReturnType boost::geometry::detail::calculate_polygon_sum<ReturnType, Polygon, Strategy, Policy>::sum_interior_rings(const Rings &, const Strategy &) [with ReturnType=double, Polygon=boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, 1, 1, stlp_std::vector, stlp_std::vector, stlp_std::allocator, stlp_std::allocator>, 
1>      Strategy=boost::geometry::strategy::area::surveyor<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, void>, Policy=boost::geometry::detail::area::ring_area<const boost::geometry::model::ring<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, 1, 1, stlp_std::vector, stlp_std::allocator>, boost::geometry::iterate_forward, boost::geometry::closed, 
1>      boost::geometry::strategy::area::surveyor<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, void>>, Rings=stlp_std::vector<boost::geometry::model::ring<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, 1, 1, stlp_std::vector, stlp_std::allocator>, stlp_std::allocator<boost::geometry::model::ring<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, 1, 1, stlp_std::vector, stlp_std::allocator>>>]" 
1>      at line 54 of "d:\boost\boost_1_47_0\boost/geometry/algorithms/detail/calculate_sum.hpp" 
1>   instantiation of "ReturnType boost::geometry::detail::calculate_polygon_sum<ReturnType, Polygon, Strategy, Policy>::apply(const Polygon &, const Strategy &) [with ReturnType=double, Polygon=boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, 1, 1, stlp_std::vector, stlp_std::vector, stlp_std::allocator, stlp_std::allocator>, Strategy=boost::geometry::strategy::area::surveyor<boost::geometry::model::d2::point_xy<float, 
1>      boost::geometry::cs::cartesian>, void>, Policy=boost::geometry::detail::area::ring_area<const boost::geometry::model::ring<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, 1, 1, stlp_std::vector, stlp_std::allocator>, boost::geometry::iterate_forward, boost::geometry::closed, boost::geometry::strategy::area::surveyor<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, void>>]" at line 237 of 
1>      "d:\boost\boost_1_47_0\boost/geometry/algorithms/area.hpp" 
1>   instantiation of "boost::geometry::default_area_result<Geometry>::type boost::geometry::area(const Geometry &) [with Geometry=boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<float, boost::geometry::cs::cartesian>, 1, 1, stlp_std::vector, stlp_std::vector, stlp_std::allocator, stlp_std::allocator>]" at line 314 of ".\calculation.cpp" 
+0

我现在已经报告这是一个错误提升,让我们看看他们是否知道...... –

+0

原来,Boost并没有正式支持Windows上的英特尔编译器。 –

回答

0

这日提交的作为升压的错误。但是Boost并没有在Windows上正式支持英特尔编译器,所以它可能很久没有解决了。