bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Headers and templated classes


From: David Sugar
Subject: Re: Headers and templated classes
Date: Thu, 2 Jan 2003 11:10:32 -0500
User-agent: KMail/1.4.3

Templating is not the only issue that distinguishes ccext and ccgnu.  Things 
that require or induce new library link requirements also are in ccext.  
Hence, for example, if you do not wish to use XML parsing in your 
application, why create an unused library dependency for libxml2?  The idea 
being that one can, if one needs to, use only "core" features found in 
libccgnu2 and then create very compact executables with very few additional 
library dependencies.   This also is the reason that ccssl is seperate.  
Since "openssl" is already a very large library image in itself, it seemed 
best to use a seperate libccssl to isolate that dependency, since I expect 
ssl will be far less commonly used in most Common C++ applications than XML 
parsing or other things already commonly found in ccext2.

On Thursday 02 January 2003 09:25, Albert Strasheim wrote:
> Hello,
>
> On Thu, 02 Jan 2003, David Sugar wrote:
> > The reason they were in a seperate directory originally was that they
> > came about late in the development of Common C++ and so idea of having a
> > Common C++ template library was new.  However, the throught at the time
> > was also that there were still many C++ compilers in production use that
> > generate template code poorly or incorrectly, and so I thought it was
> > best to make it easy to isolate any template classes from the rest of the
> > library if one simply did not want to make use templates at all or had
> > poor or broken compilers.  Even today, none of the core libccgnu2 classes
> > make use of any template code, although templates are found in some
> > things in libccext2.
>
> I was wondering about the distinction between libccgnu2 and libccext2.
> Would it be safe to assume that templated code is okay for libccext2,
> but not for libccgnu2? Are there any other distinctions?
>
> How many commercial compilers are still out there that handle templates
> poorly? I came across an interesting article, C++ portability guide,
> from mozilla.org,
>
> http://www.mozilla.org/hacking/portable-cpp.html
>
> They say to avoid templates. But also to avoid exceptions. (This was
> in 1998.) So I don't know where you draw the line. Personally, if
> you're not using gcc 3.2, you deserve to suffer, but I guess my
> philosophy doesn't work too well for an open source project. :-)
>
> It seems C++ templates have been around since 1995. So one has to ask
> the question: if your compiler doesn't support it after more than 8
> years, is it ever going to support it?
>
> As an aside, is there a reason that the SSL code is also now being
> compiled to another library?
>
> The current layout of the libraries seems to be economizing on headers
> and "spending" on libraries. I'm used to it being the other way round.
> How receptive are you to suggestions for restructuring the headers?
>
> Cheers,
>
> Albert




reply via email to

[Prev in Thread] Current Thread [Next in Thread]