Opened 7 years ago
Closed 7 years ago
#11966 closed Bugs (fixed)
[geometry] svg() does not compile for box and double coordinateType
| Reported by: | Owned by: | Barend Gehrels | |
|---|---|---|---|
| Milestone: | Boost 1.61.0 | Component: | geometry | 
| Version: | Boost 1.59.0 | Severity: | Problem | 
| Keywords: | svg | Cc: | 
Description
The function boost::geometry::svg() produces compilation error if used with a box that has double as CoordinateType.
In file included from /usr/include/boost/geometry/io/svg/svg_mapper.hpp:43:0,
                 from /usr/include/boost/geometry/geometry.hpp:113,
                 from /usr/include/boost/geometry.hpp:17,
                 from /home/supasonic/src/TestBoostGeometry/main.cpp:1:
/usr/include/boost/geometry/io/svg/write_svg.hpp: In instantiation of 'static void boost::geometry::detail::svg::svg_box<Box>::apply(std::basic_ostream<Ch2, Tr2>&, const Box&, const string&, int) [with Char = char; Traits = std::char_traits<char>; Box = boost::geometry::model::box<boost::geometry::model::d2::point_xy<double> >; std::__cxx11::string = std::__cxx11::basic_string<char>]':
/usr/include/boost/geometry/io/svg/write_svg.hpp:249:21:   required from 'std::basic_ostream<Ch2, Tr2>& boost::geometry::operator<<(std::basic_ostream<Ch2, Tr2>&, const boost::geometry::svg_manipulator<G>&) [with Char = char; Traits = std::char_traits<char>; G = boost::geometry::model::box<boost::geometry::model::d2::point_xy<double> >]'
/home/supasonic/src/TestBoostGeometry/main.cpp:12:75:   required from here
/usr/include/boost/geometry/io/svg/write_svg.hpp:69:56: error: no matching function for call to 'max(int, boost::geometry::coordinate_type<boost::geometry::model::box<boost::geometry::model::d2::point_xy<double> > >::type)'
         ct width = max BOOST_PREVENT_MACRO_SUBSTITUTION(1,
                                                        ^
      Attachments (1)
Change History (2)
by , 7 years ago
| Attachment: | bugreport.cpp added | 
|---|
comment:1 by , 7 years ago
| Keywords: | svg added | 
|---|---|
| Milestone: | To Be Determined → Boost 1.61.0 | 
| Resolution: | → fixed | 
| Status: | new → closed | 
  Note:
 See   TracTickets
 for help on using tickets.
    

Thanks!
Fix: https://github.com/boostorg/geometry/commit/dc3c5416f4d3c817a7a578d222a3c8f275d8b2bf