[Geometry] Problem with assign

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Geometry] Problem with assign

Hartmut Kaiser

The following fails to compile:

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

int main()
{
    typedef boost::geometry::model::d2::point_xy<int> int_point_type;
    typedef boost::geometry::model::polygon<int_point_type>
int_polygon_type;

    typedef boost::geometry::model::d2::point_xy<double> double_point_type;
    typedef boost::geometry::model::polygon<double_point_type>
double_polygon_type;

    int_polygon_type ip;
    double_polygon_type dp;

    boost::geometry::assign(dp, ip);

    return 0;
}

Shouldn't it actually compile?

Regards Hartmut
---------------
http://boost-spirit.com



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [Geometry] Problem with assign

Barend Gehrels
Hi Hartmut,






>
> The following fails to compile:
>
> #include <boost/geometry.hpp>
> #include <boost/geometry/geometries/point_xy.hpp>
> #include <boost/geometry/geometries/polygon.hpp>
>
> int main()
> {
>    typedef boost::geometry::model::d2::point_xy<int> int_point_type;
>    typedef boost::geometry::model::polygon<int_point_type>
> int_polygon_type;
>
>    typedef boost::geometry::model::d2::point_xy<double> double_point_type;
>    typedef boost::geometry::model::polygon<double_point_type>
> double_polygon_type;
>
>    int_polygon_type ip;
>    double_polygon_type dp;
>
>    boost::geometry::assign(dp, ip);
>
>    return 0;
> }
>
> Shouldn't it actually compile?


I will look tonight, but probably you have to use "convert" for this.

Regards, Barend


Sent from iPad.
Barend Gehrels
www.barendgehrels.nl



>
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [Geometry] Problem with assign

Barend Gehrels
In reply to this post by Hartmut Kaiser
Hi Hartmut,

On 11-7-2011 0:30, Hartmut Kaiser wrote:

> The following fails to compile:
>
> #include<boost/geometry.hpp>
> #include<boost/geometry/geometries/point_xy.hpp>
> #include<boost/geometry/geometries/polygon.hpp>
>
> int main()
> {
>      typedef boost::geometry::model::d2::point_xy<int>  int_point_type;
>      typedef boost::geometry::model::polygon<int_point_type>
> int_polygon_type;
>
>      typedef boost::geometry::model::d2::point_xy<double>  double_point_type;
>      typedef boost::geometry::model::polygon<double_point_type>
> double_polygon_type;
>
>      int_polygon_type ip;
>      double_polygon_type dp;
>
>      boost::geometry::assign(dp, ip);
>
>      return 0;
> }


Indeed it fails, also with the convert function (actually they fail at
the same point). Sorry about that. I will implement it, in Trunk, soon
(but I'm busy with some other requests as well so it might take a while).

Regards, Barend


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [Geometry] Problem with assign

Hartmut Kaiser
Thanks Barend. Please keep me posted.

Regards Hartmut
---------------
http://boost-spirit.com


> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> On Behalf Of Barend Gehrels
> Sent: Monday, July 11, 2011 1:36 PM
> To: [hidden email]
> Subject: Re: [boost] [Geometry] Problem with assign
>
> Hi Hartmut,
>
> On 11-7-2011 0:30, Hartmut Kaiser wrote:
> > The following fails to compile:
> >
> > #include<boost/geometry.hpp>
> > #include<boost/geometry/geometries/point_xy.hpp>
> > #include<boost/geometry/geometries/polygon.hpp>
> >
> > int main()
> > {
> >      typedef boost::geometry::model::d2::point_xy<int>  int_point_type;
> >      typedef boost::geometry::model::polygon<int_point_type>
> > int_polygon_type;
> >
> >      typedef boost::geometry::model::d2::point_xy<double>
> double_point_type;
> >      typedef boost::geometry::model::polygon<double_point_type>
> > double_polygon_type;
> >
> >      int_polygon_type ip;
> >      double_polygon_type dp;
> >
> >      boost::geometry::assign(dp, ip);
> >
> >      return 0;
> > }
>
>
> Indeed it fails, also with the convert function (actually they fail at the
> same point). Sorry about that. I will implement it, in Trunk, soon (but
> I'm busy with some other requests as well so it might take a while).
>
> Regards, Barend
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [Geometry] Problem with assign

Barend Gehrels
In reply to this post by Hartmut Kaiser
Hi Hartmut,

On 11-7-2011 0:30, Hartmut Kaiser wrote:

> The following fails to compile:
>
> #include<boost/geometry.hpp>
> #include<boost/geometry/geometries/point_xy.hpp>
> #include<boost/geometry/geometries/polygon.hpp>
>
> int main()
> {
>      typedef boost::geometry::model::d2::point_xy<int>  int_point_type;
>      typedef boost::geometry::model::polygon<int_point_type>
> int_polygon_type;
>
>      typedef boost::geometry::model::d2::point_xy<double>  double_point_type;
>      typedef boost::geometry::model::polygon<double_point_type>
> double_polygon_type;
>
>      int_polygon_type ip;
>      double_polygon_type dp;
>
>      boost::geometry::assign(dp, ip);
>
>      return 0;
> }
>
> Shouldn't it actually compile?

It is fixed in Trunk. This (and many other combinations) do now compile.

Thanks for the report,
Barend

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [Geometry] Problem with assign

Hartmut Kaiser
> On 11-7-2011 0:30, Hartmut Kaiser wrote:
> > The following fails to compile:
> >
> > #include<boost/geometry.hpp>
> > #include<boost/geometry/geometries/point_xy.hpp>
> > #include<boost/geometry/geometries/polygon.hpp>
> >
> > int main()
> > {
> >      typedef boost::geometry::model::d2::point_xy<int>  int_point_type;
> >      typedef boost::geometry::model::polygon<int_point_type>
> > int_polygon_type;
> >
> >      typedef boost::geometry::model::d2::point_xy<double>
> double_point_type;
> >      typedef boost::geometry::model::polygon<double_point_type>
> > double_polygon_type;
> >
> >      int_polygon_type ip;
> >      double_polygon_type dp;
> >
> >      boost::geometry::assign(dp, ip);
> >
> >      return 0;
> > }
> >
> > Shouldn't it actually compile?
>
> It is fixed in Trunk. This (and many other combinations) do now compile.

Thanks Barend!

Regards Hartmut
---------------
http://boost-spirit.com



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost