Subject: CGAL users discussion list
List archive
- From: "Jannis Warnat" <>
- To: <>
- Subject: [cgal-discuss] Arr_linear_traits_2.h
- Date: Thu, 18 Dec 2008 15:06:33 +0100
Hello,
I am experimenting with the Arrangement_2
demo. When I exchanged the use of Arr_segment_traits_2 to
Arr_linear_traits_2 the following function from the file demo_tab.h
didn“t work anymore:
void
draw_xcurve(Qt_widget_demo_tab<Segment_tab_traits>
* w, X_monotone_curve_2 c)
{
(*w) << c;
}
I got the following compiler errors:
../../include/CGAL/Arr_linear_traits_2.h:1705:
error: no match for 'operator<<' in 'os << " P "'
../../include/CGAL/Arr_linear_traits_2.h:1707: error: no
match for 'operator<<' in 'os << " S "'
../../include/CGAL/Arr_linear_traits_2.h:1709: error: no
match for 'operator<<' in 'os << " R "'
../../include/CGAL/Arr_linear_traits_2.h:1711: error: no
match for 'operator<<' in 'os << " L "'
Here is the code snippet from Arr_linear_traits_2.h:
template <class Kernel, class
OutputStream>
OutputStream& operator<< (OutputStream&
os,
const Arr_linear_object_2<Kernel>&
lobj)
{
// Print a letter identifying the object type, then the
object itself.
if (lobj.is_point())
os << " P " << lobj.point();
else if (lobj.is_segment())
os << " S " << lobj.segment();
else if (lobj.is_ray())
os << " R " << lobj.ray();
else
os << " L " << lobj.line();
return (os);
}
It works fine if I comment out the letters, e.g. change
os << " P " << lobj.point();
to
os << /*" P " <<*/
lobj.point();
Not sure if this is valuable information to you.
Sincerely,
Jannis Warnat
|
- [cgal-discuss] Arr_linear_traits_2.h, Jannis Warnat, 12/18/2008
Archive powered by MHonArc 2.6.16.