Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7060585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:22:13+00:00 2026-05-28T04:22:13+00:00

First off, a big thanks to the people behind the new boost::geometry library! This

  • 0

First off, a big thanks to the people behind the new boost::geometry library!

This question replaces an earlier one which I have now split into two as two separate issues have become clearer.

I have read http://www.boost.org/doc/libs/1_47_0/libs/geometry/doc/html/geometry/design.html which explains the traits mechanism but am none the wiser as to why this code doesn’t compile…

//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::multi_point<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);
}

The first error is

Error   1   error C2039: 'apply' : is not a member of 'boost::geometry::dispatch::for_each_range<Tag,Geometry,Actor,IsConst>'   d:\boost\boost_1_47_0\boost\geometry\algorithms\detail\for_each_range.hpp   115 boost_geom_test

If I use a polygon instead of a multipoint, the code works just fine, though presumably with overheads I don’t need. What is going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:22:14+00:00Added an answer on May 28, 2026 at 4:22 am

    This turned out to be a bug in boost. It is now fixed in the head revision and should roll out in 1.49.0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off I am new to this site and it is a big help,
First off, this may be the wrong Forum for this question, as it's pretty
This might be a 2 part question. First one is what am I doing
First off this question has been helpful in my understanding of how to subclass
First off, I would like to make clear, that I am SUPER NEW TO
First off I use this code to make the navigation bar always stay fixed;
First off, the function in question. bool Animation::loadFrames() { sf::Texture frame[frameCount]; std::string pathToFrame; for(int
First off tags wont work. I say this because i create 4 buttons all
First off, full disclosure: This is going towards a uni assignment, so I don't
First, yes i know this is a big security NONO . But the scenario

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.