bug-commoncpp
[Top][All Lists]
Advanced

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

Re: Headers and templated classes


From: Albert Strasheim
Subject: Re: Headers and templated classes
Date: Thu, 2 Jan 2003 16:25:24 +0200
User-agent: Mutt/1.4i

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]