What I just posted to slashdot, regarding templates: The C++ portability guidelines are just that: _portability_ _guidelines_. The primary goal is to make it work on as many compilers as possible, and they are guidelines not rules. There are some platforms which, to this day, do not support anything beyond the simplest C++ templates.
Mozilla makes extensive use of templates with their nsCOMPtr class, but this particular class has been well tested on many platforms, and has many conditional #ifdef's which handle the broken compilers. But this is one major class for which the usefulness outweighed the maintenance costs. If the Mozilla team had to maintain 100 different constantly-changing template classes on 20 different compilers each with their own quirks, it would be a nightmare. Alec Rick Parrish wrote: > Link to the document in question ... > > http://www.mozilla.org/hacking/portable-cpp.html > > Here's the link to the person's comments on slashdot ... > > >http://slashdot.org/comments.pl?sid=23789&threshold=0&commentsort=0&mode=thread&pid=2569881#2570009 > > > > What are people's opinions on this? Is this document out of date > as the above comments suggest? > > -rick >
