Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Binary Polyhedron_3 I/O questions

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Binary Polyhedron_3 I/O questions


Chronological Thread 
  • From: Laurent Rineau <>
  • To:
  • Subject: Re: [cgal-discuss] Binary Polyhedron_3 I/O questions
  • Date: Wed, 19 Nov 2008 10:58:13 +0100

On Wednesday 19 November 2008 04:17:34 Rui Guo wrote:
> It seems that the operator>> is the std::operator>>.

> #include <CGAL/IO/Polyhedron_iostream.h>
> use CGAL::operator>>

No. std::operator>> cannot has a polyhedron as second operand. Due to Koenig
lookup¹ (also named "argument dependent name lookup"), the compiler search a
matching operator>> in the namespace of the second operand, which is CGAL.
And it find the following operator:

template < class Traits,
class Items,
template < class T, class I, class A>
class HDS, class Alloc>
std::istream& operator>>(std::istream& in,
Polyhedron_3<Traits,Items,HDS,Alloc>& P)

which is defined in <CGAL/IO/Polyhedron_iostream.h> (unless that file is not
included).

¹) For Koenig lookup, see:
http://en.wikipedia.org/wiki/Koenig_Lookup
--
Laurent Rineau, PhD
Engineer at GeometryFactory
http://www.geometryfactory.com/



Archive powered by MHonArc 2.6.16.

Top of Page