POV-Ray : Newsgroups : povray.unofficial.patches : Major bug in MegaPOV Plus? : Re: Major bug in MegaPOV Plus? Server Time
2 Sep 2024 08:14:20 EDT (-0400)
  Re: Major bug in MegaPOV Plus?  
From: Thorsten Froehlich
Date: 8 Sep 2000 13:21:13
Message: <39b92009@news.povray.org>
In article <39b9050f@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

> : And because when I was *trying*
> : to learn the STL, I often got errors and couldn't figure out why?
>
>   Get a proper compiler and try again. You can get one by free.

Actually, CodeWarrior is a good (not perfect) compiler with a really good
and ISO C++ standard compliant _library_.  The only not supported ISO C++
language feature (and thus it is not fully compliant to the ISO C++
standard...) is the "export" keyword for templates (section 14, paragraph
6), but I know only very few compilers that support it (if you know one for
IRIX or Mac OS, I am interested!).

The library itself passes all special cases listed in the ISO C++ standard
as well as the ones in The C++ Prog. Lang. 3rd Ed, Appendix B (I tried those
myself).  CodeWarrior is also supposed to (I never checked) support the
minimum limits listed in Annex B of the ISO C++ standard.

As for the STL, being compliant causes a lot of problems with other
compilers.  Take a look at gcc and the iostreams it comes with.  They are so
far behind the standard, you need to make fixes all over the place to get it
to work cross-platform.

>   And read documentation and tutorials.

Now, when you buy a book that covers STL, you have one of two problems:
Either it doesn't cover the ISO C++ STL or it does and you can't use it with
a lot of compilers (Visual C 5.0 also had a lot of problems, 6.0 seems to be
better, gcc is still a mess).

This example does apply when trying to compile CodeWarrior code with Visual
C++ 5.0 (it happened to me!!!):
If you get an error message you end up having to analyse error messages and
try to figure out what is wrong.  Sometimes these error messages can be
impossible to understand when you assume you have a compliant library.  My
mistake was to use a "getchar" member function in one class.  Too bad, some
compiler libraries have not been updated to the ISO C++ standard (which
requires this to be a function!) and it is still a macro.  Now, your
compiler will always tell you something about an illegal class declaration,
but everything looks OK!!!

Now, this isn't even an example with an STL problem and it can still be hard
to understand the problem.  Try making a simple mistake just like declaring
a nested template with '>>' at the end.  How useful is the error message you
get from _your_ compiler?


     Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.