[Boost-bugs] [Boost C++ Libraries] #7154: [polygon] Build fails with gcc-4.7

Subject: [Boost-bugs] [Boost C++ Libraries] #7154: [polygon] Build fails with gcc-4.7
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-20 09:53:30


#7154: [polygon] Build fails with gcc-4.7
------------------------------+---------------------------------------------
 Reporter: denis.arnaud | Owner: ljsimons
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: polygon
  Version: Boost 1.50.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 Reference: http://bugzilla.redhat.com/show_bug.cgi?id=784654


 Building the attached gtl-polygon-set.cc (example program from upstream
 website:
 http://www.boost.org/doc/libs/1_48_0/libs/polygon/doc/gtl_polygon_set_usage.htm)
 with boost-devel-1.48.0-8.fc17.x86_64 and gcc-c++-4.7.0-0.9.fc17.x86_64
 fails with:
 g++ -Wall -O2 -g gtl-polygon-set.cc -o gtl-polygon-set
 In file included from /usr/include/boost/polygon/polygon.hpp:64:0,
                  from gtl-polygon-set.cc:8:
 /usr/include/boost/polygon/polygon_90_set_data.hpp: In instantiation of
 â€˜void boost::polygon::polygon_90_set_data<T>::sort() const [with T =
 int]’:
 /usr/include/boost/polygon/polygon_45_set_data.hpp:1550:7: required from
 â€˜void
 boost::polygon::polygon_45_set_data<Unit>::applyAdaptiveBoolean_(boost::polygon::polygon_45_set_data<Unit>&,
 const boost::polygon::polygon_45_set_data<Unit>&) const [with int op = 0;
 Unit = int]’
 /usr/include/boost/polygon/detail/polygon_set_view.hpp:108:9: required
 from ‘void boost::polygon::execute_boolean_op(value_type&, const
 geometry_type_1&, const geometry_type_2&) [with value_type =
 boost::polygon::polygon_set_data<int>; geometry_type_1 =
 std::vector<boost::polygon::polygon_data<int> >; geometry_type_2 =
 boost::polygon::rectangle_data<int>; int op_type = 0]’
 /usr/include/boost/polygon/detail/polygon_set_view.hpp:197:5: required
 from ‘geometry_type_1&
 boost::polygon::self_assignment_boolean_op(geometry_type_1&, const
 geometry_type_2&) [with geometry_type_1 =
 std::vector<boost::polygon::polygon_data<int> >; geometry_type_2 =
 boost::polygon::rectangle_data<int>; int op_type = 0]’
 /usr/include/boost/polygon/polygon_set_concept.hpp:388:90: required from
 â€˜typename boost::enable_if<typename
 boost::polygon::gtl_and_4<boost::polygon::operators::yes_ps_ope,
 boost::polygon::gtl_yes, typename
 boost::polygon::is_mutable_polygon_set_type<polygon_set_type_1>::type,
 typename
 boost::polygon::is_any_polygon_set_type<polygon_set_type_2>::type>::type,
 geometry_type_1>::type&
 boost::polygon::operators::operator+=(geometry_type_1&, const
 geometry_type_2&) [with geometry_type_1 =
 std::vector<boost::polygon::polygon_data<int> >; geometry_type_2 =
 boost::polygon::rectangle_data<int>; typename boost::enable_if<typename
 boost::polygon::gtl_and_4<boost::polygon::operators::yes_ps_ope,
 boost::polygon::gtl_yes, typename
 boost::polygon::is_mutable_polygon_set_type<polygon_set_type_1>::type,
 typename
 boost::polygon::is_any_polygon_set_type<polygon_set_type_2>::type>::type,
 geometry_type_1>::type = std::vector<boost::polygon::polygon_data<int> >]’
 gtl-polygon-set.cc:20:43: required from here
 /usr/include/boost/polygon/polygon_90_set_data.hpp:299:9: error: ‘gtlsort’
 was not declared in this scope, and no declarations were found by
 argument-dependent lookup at the point of instantiation [-fpermissive]
 In file included from
 /usr/include/boost/polygon/detail/scan_arbitrary.hpp:13:0,
                  from /usr/include/boost/polygon/polygon_set_data.hpp:929,
                  from /usr/include/boost/polygon/polygon.hpp:82,
                  from gtl-polygon-set.cc:8:
 /usr/include/boost/polygon/detail/polygon_sort_adaptor.hpp:58:10: note:
 â€˜template<class iter_type, class pred_type> void
 boost::polygon::gtlsort(iter_type, iter_type, const pred_type&)’ declared
 here, later in the translation unit
 make: *** [gtl-polygon-set] Error 1


 This can be fixed by patching boost/polygon.hpp to make the gtlsort()
 declaration appear earlier:
 --- /usr/include/boost/polygon/polygon.hpp.orig 2012-01-26
 01:05:15.934998805 +0800
 +++ /usr/include/boost/polygon/polygon.hpp 2012-01-26
 01:13:10.547000000 +0800
 @@ -24,6 +24,8 @@
  #include "transform.hpp"
  #include "detail/transform_detail.hpp"

 +#include "detail/polygon_sort_adaptor.hpp"
 +
  //interval
  #include "interval_data.hpp"
  #include "interval_traits.hpp"

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7154>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC