Subject: CGAL users discussion list
List archive
- From: Laurent Rineau <>
- To:
- Subject: Re: [cgal-discuss] error C2662 in creating a surface class for
- Date: Mon, 24 Nov 2008 14:58:49 +0100
On Saturday 22 November 2008 11:05:44
wrote:
> Thank you! What worked is uniting the surface_mesh_traits with the
> surface_3 class and adding a few "consts" here and there..
Only the constification was really necessary. Actually. The error message was:
"cannot convert 'this' pointer from 'const MeshSurface::MeshTraits'
to 'MeshSurface::MeshTraits&'". It means that the compiler cannot convert an
object of type:
const MeshTraits
to:
MeshTraits&
The major difference between the two types it the const. Most probably the
operator() of MeshIntersect need to take the "surface" argument as const.
--
Laurent Rineau, PhD
Engineer at GeometryFactory
http://www.geometryfactory.com/
--- Begin Message ---
- From:
- To:
- Subject: r46987 - trunk/Mesh_2/demo/Mesh_2
- Date: Sat, 22 Nov 2008 15:40:28 +0100
- List-archive: <http://lists.gforge.inria.fr/cgi-bin/mailman/private/cgal-commits>
- List-id: svn commits <cgal-commits.lists.gforge.inria.fr>
Summary
Revision in ViewCVS
New Revision: 46987
Author: lrineau
Date: 2008-11-22 15:40:27 +0100 (Sat, 22 Nov 2008)
Log message:
Remove an old piece of code that has been superseded by CGAL code in CGAL-3.3 (CGAL_assertion now triggers exceptions, by default).Modified files
trunk/Mesh_2/demo/Mesh_2/mesh_2_demo.cpp
Differences as text
Modified: trunk/Mesh_2/demo/Mesh_2/mesh_2_demo.cpp =================================================================== --- trunk/Mesh_2/demo/Mesh_2/mesh_2_demo.cpp 2008-11-21 20:03:28 UTC (rev 46986) +++ trunk/Mesh_2/demo/Mesh_2/mesh_2_demo.cpp 2008-11-22 14:40:27 UTC (rev 46987) @@ -1506,39 +1506,6 @@ "Shewchuk Triangle .poly files (*.poly);;" "All files (*)"; - -#include <CGAL/assertions.h> -#include <CGAL/assertions_behaviour.h> -#include <exception> - -CGAL::Failure_function my_previous_failure_function; - -class Cgal_exception : public std::exception { -public: - Cgal_exception(const char *t, - const char *e, - const char* f, - int l, - const char* m) - : type(t), expr(e), file(f), line(l), msg(m) {}; - - const char *type; - const char *expr; - const char* file; - int line; - const char* msg; -}; - -void cgal_with_exceptions_failure_handler( - const char *type, - const char *expr, - const char* file, - int line, - const char* msg) -{ - throw Cgal_exception(type,expr,file,line,msg); -} - int main(int argc, char** argv) { QApplication app( argc, argv ); @@ -1553,24 +1520,7 @@ if( argc == 2 ) W->openTriangulation(QString(argv[1])); - // my_previous_failure_function = - //CGAL::set_error_handler(cgal_with_exceptions_failure_handler); - - try { - return app.exec(); - } - catch(Cgal_exception e) { - std::cerr << "catch(Cgal_exception e)" << std::endl; - try { - W->dumpTriangulation(); - } - catch(...) { - std::cerr << "PANIC !!" << std::endl; - } - my_previous_failure_function(e.type, e.expr, e.file, e. line, e.msg); - } - - return 0; + return app.exec(); } // moc_source_file: mesh_2_demo.cpp
--- End Message ---
- [cgal-discuss] error C2662 in creating a surface class for surface meshing, avaxman, 11/22/2008
- Re: [cgal-discuss] error C2662 in creating a surface class for, avaxman, 11/22/2008
- Re: [cgal-discuss] error C2662 in creating a surface class for surface, Pierre Alliez, 11/22/2008
- Re: Re: [cgal-discuss] error C2662 in creating a surface class for, avaxman, 11/22/2008
- Re: [cgal-discuss] error C2662 in creating a surface class for, Laurent Rineau, 11/24/2008
- Re: Re: [cgal-discuss] error C2662 in creating a surface class for, avaxman, 11/22/2008
Archive powered by MHonArc 2.6.16.