Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Access to CGAL source files
- Date: Tue, 30 Mar 2010 14:55:37 +0200
- Organization: GeometryFactory
On Tuesday 30 March 2010 13:56:23 Louis Lavery wrote:
> Laurent Rineau (GeometryFactory) wrote:
> > On Tuesday 30 March 2010 11:30:43 Louis Lavery wrote:
> >> Neither can I, but that's not what I'm suggesting.
> >>
> >> All I mean is that you can do that same as you do for non-template code.
> >> You put the declaration in a header (so as users can see that) and the
> >> definition in a .cpp (as the users don't really want/need to see that).
> >>
> >> Of course, you need to #include the .cpp in the header (I think it's
> >> natural to do that at the foot of the header) and put a #include guard
> >> in the .cpp (to avoid recursion).
> >>
> >> I find it a lot easier to work this way, both as an author and as a
> >> user of a library.
> >>
> >> I know some others also use this style (sorry, haven't a ref to hand)
> >> and it works just fine. As I say, it reduces clutter in the header,
> >> and that's important to me for my users.
> >
> > OK.
> >
> > Some CGAL classes are wrote like that. Unfortunately, Visual C++ has a
> > bug: it cannot handle definitions of member templates functions outside
> > of the scope of the class definition.
>
> Then put the template member functions in the class definition.
> It's not a reason not to use separate header and .cpp files, at
> least not for me.
>
> Louis.
>
> P.S. vc8 seems doesn't seem to have that bug.
You are right: now that cgal.org has dropped the support of VC7.1, one could
probably stop to work around that bug.
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- [cgal-discuss] Access to CGAL source files, Guilherme Kunigami, 03/29/2010
- Re: [cgal-discuss] Access to CGAL source files, avishek banerjee, 03/29/2010
- Re: [cgal-discuss] Access to CGAL source files, Guilherme Kunigami, 03/30/2010
- Re: [cgal-discuss] Access to CGAL source files, Mohamed Yousef, 03/30/2010
- Re: [cgal-discuss] Access to CGAL source files, Louis Lavery, 03/30/2010
- Re: [cgal-discuss] Access to CGAL source files, Laurent Rineau (GeometryFactory), 03/30/2010
- Re: [cgal-discuss] Access to CGAL source files, Louis Lavery, 03/30/2010
- Re: [cgal-discuss] Access to CGAL source files, Laurent Rineau (GeometryFactory), 03/30/2010
- Re: [cgal-discuss] Access to CGAL source files, Louis Lavery, 03/30/2010
- Re: [cgal-discuss] Access to CGAL source files, Laurent Rineau (GeometryFactory), 03/30/2010
- Re: [cgal-discuss] Access to CGAL source files, Laurent Rineau (GeometryFactory), 03/30/2010
- Re: [cgal-discuss] Access to CGAL source files, Louis Lavery, 03/30/2010
- Re: [cgal-discuss] Access to CGAL source files, Laurent Rineau (GeometryFactory), 03/30/2010
- Re: [cgal-discuss] Access to CGAL source files, Guilherme Kunigami, 03/30/2010
- Re: [cgal-discuss] Access to CGAL source files, avishek banerjee, 03/29/2010
Archive powered by MHonArc 2.6.16.