Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!
- Date: Wed, 7 Oct 2009 23:52:20 +0200
- Organization: GeometryFactory
Le mercredi 07 octobre 2009 23:20:19, Gilles Kneuss a écrit :
> Re-hello,
>
> my last reply was not as clear as it should be :
>
> DT2<Gt>* heritage=new DT2<Gt>();
>
> or
>
> DT2<K,Gt>* heritage=new DT2<Gt>();
>
> Give the same compile problems (the first error is) :
>
> "main.cpp:23: erreur: wrong number of template arguments (1, should be 2)"
>
> Any other ideas ?
See what you wrote:
> >> > template <class kernel, class TDS>
> >> > class DT2 : public CGAL::Delaunay_triangulation_2<kernel,TDS>
DT2 is template by kernel *and* TDS. You need to pass a TDS as argument.
I suggest the following:
typedef CGAL::Triangulation_data_structure_2 <
CGAL::Triangulation_vertex_base_2<Gt> > TDS;
typedef DT2<Gt, TDS> Tr;
Tr* heritage = new Tr;
Another possibility would have been:
template <class Kernel>
class DT2 : public CGAL::Delaunay_triangulation_2<Kernel> {
// ...
};
and DT2<Gt>.
The reason is that the second template argument of
CGAL::Delaunay_triangulation_2 has a default value, which is
CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt> >
--
Laurent Rineau, PhD
Release Manager of the CGAL Project
http://www.cgal.org/
R&D Engineer at GeometryFactory
http://www.geometryfactory.com/
- [cgal-discuss] Having still problems inheriting CGAL classes ! HELP !, gilles.kneuss, 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Laurent Rineau (GeometryFactory), 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Gilles Kneuss, 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Gilles Kneuss, 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Laurent Rineau (GeometryFactory), 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Gilles Kneuss, 10/08/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Laurent Rineau (GeometryFactory), 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Gilles Kneuss, 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Gilles Kneuss, 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Laurent Rineau (GeometryFactory), 10/07/2009
Archive powered by MHonArc 2.6.16.