Subject: CGAL users discussion list
List archive
- From: "Yajun Wang" <>
- To:
- Subject: Re: [cgal-discuss] operator '<' overloaded
- Date: Mon, 4 Dec 2006 20:09:49 +0800
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=nDUjEMc1b+PGteRk7/vVqZQ9YjOqGrtjlgAnQA3OWbGIgqy7qEvKUXztv14Jpg1hHL3oYkqDDMUbYOi6vYLCPoAM1ex0U9gkx+e/dj48ZRuK3h50Hr187g3UsxiywcFdKffs82r2wNPoBsoWlY1Tauc5R+XVo06TifNisDSuk4A=
Dear Yukie:
According to stl standard, you have to define the comparison between
FacetIterators in order to use std::map in this case.
http://www.sgi.com/tech/stl/Map.html
regards,
yalding
On 12/4/06,
<>
wrote:
Hello,
I use a std::map<,> in my code,
and received a message as follows.
< Error message
>**************************************************************
...
c:/NAGAI/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_function.h:227:
error: no match for 'operator<' in '__x < __y'
C:/NAGAI/CGAL/CGAL-3.2.1/include/CGAL/Gmpz.h:151: note: candidates are: bool
CGAL::operator<(const CGAL::Gmpz&, int)
C:/NAGAI/CGAL/CGAL-3.2.1/include/CGAL/Gmpz.h:139: note: bool
CGAL::operator<(const CGAL::Gmpz&, const CGAL::Gmpz&)
C:/NAGAI/CGAL/CGAL-3.2.1/include/CGAL/MP_Float.h:269: note: bool
CGAL::operator<(const CGAL::MP_Float&, const CGAL::MP_Float&)
...
*****************************************************************
I think this error is related to overloading the operator '<' in CGAL.
All of the code is long, so I'll show a part of it.
I skipped many parts of code which I consider they mean nothing to this
problem.
< A part of codes
>**************************************************************
...
struct ControlPointsOfFacet{
Point p[ 10 ];
};
...
class Surface{
public:
Polyhedron surfaceMesh;
std::map< FacetIterator, ControlPointsOfFacet > controlPoint;
...
}
...
...( in another member function of class Surface )
Surface surface;
...
FacetIterator fit = surface.surfaceMesh.facets_begin();
...
ControlPointsOfFacet cp;
cp.p[0]=Point(...);
...
cp.p[9]=Point(...);
...
controlPoint.insert( std::make_pair( fit, cp ) );
...
*****************************************************************
How can I fix this problem?
Regards,
Yukie NAGAI
- operator '<' overloaded, ueberweise, 12/04/2006
- Re: [cgal-discuss] operator '<' overloaded, Andreas Fabri, 12/04/2006
- Re: [cgal-discuss] operator '<' overloaded, Yajun Wang, 12/04/2006
- Re: [cgal-discuss] operator '<' overloaded, NAGAI, Yukie, 12/05/2006
Archive powered by MHonArc 2.6.16.