Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Bug in Nef_polyhedron_iostream_3.h?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Bug in Nef_polyhedron_iostream_3.h?


Chronological Thread 
  • From: "Max" <>
  • To: "" <>
  • Subject: Re: [cgal-discuss] Bug in Nef_polyhedron_iostream_3.h?
  • Date: Mon, 11 Feb 2008 22:16:38 +0800
  • Disposition-notification-to: "Max" <>
  • Organization: LoadCom

>Hi Max,
>
>you are right, it's not so nice to have this function without a const.
>But you are wrong, it's not a bug, because the code runs as intended. As
>you already found out, it's not trivial to make everything const correct
>in SNC_io_parser.

Yes, it's what I got from having a glance on SNC_io_parser.
Yes, correctness is more important thant elegance, in case we cannot get
both. :-)

>Actually, it would be best if I split the class
>SNC_io_parser into two classes---one for input and one for output. But I
>regard this as a quite unimportant item on my long list of stuff I'd
>like to improve in Nef_3.

That's nice.

B/Rgds
Max

>
>Peter
>
>On Mon, 2008-02-11 at 13:47 +0800, Max wrote:
>> Hi,
>>
>> I found the code in Nef_polyhedron_iostream_3.h:
>>
>> template <typename Kernel, typename Items, typename Mark>
>> std::ostream& operator<<
>> (std::ostream& os, Nef_polyhedron_3<Kernel,Items,Mark>& NP)
>> {
>>
>> Should the line
>> (std::ostream& os, Nef_polyhedron_3<Kernel,Items,Mark>& NP)
>> be
>> (std::ostream& os, const Nef_polyhedron_3<Kernel,Items,Mark>& NP)
>> ^^^^^^^
>> ?
>>
>> If that's true, its forward declaration and friend declaration in class
>> Nef_polyhedron_3 should be corrected as const, and SNC_io_parser.h stuff.
>>
>> I attemped to 'correct'(if I'm correct :-)) the files
>> Nef_polyhedron_iostream_3.h
>> and Nef_polyhedron_3.h, but that seems to be not simple in file
>> SNC_io_parser.h.
>> So I've rolled back my change.
>>
>> Thanks.
>> Max
>--
>You are currently subscribed to cgal-discuss.
>To unsubscribe or access the archives, go to
>https://lists-sop.inria.fr/wws/info/cgal-discuss
>



Archive powered by MHonArc 2.6.16.

Top of Page