POV-Ray : Newsgroups : povray.unix : Compiling 3.5 source on Linux also fails : Re: Compiling 3.5 source on Linux also fails Server Time
28 Jul 2024 10:32:02 EDT (-0400)
  Re: Compiling 3.5 source on Linux also fails  
From: Christian Parpart
Date: 1 Aug 2002 20:11:37
Message: <3d49ce39@news.povray.org>
Micha Riser inspired the electrons to say:

> Warp wrote:
> 
>>   No, no! Don't kludge it. You can never know whether the STL
>>   implementations
>> are faster than that.
>>   The correct answer is to put 'using namespace std;' in config.h. (I
>>   don't
>> know why this hasn't be done already.)
>> 

Oh no! No! please, don't....... Okay, importing the whole std namespace 
globally is ugly and was never recommented in any documentation I read, 
also I personally never do that too. I just import either locally or import 
explicitely.

> Yep, of course you are right. I just could not find a reference to min/max
> in STL in my documentation. To get it working it is already enough to add
> 
> using std::max;
> using std::min;

Exactly ;)

> into config.h. I even wondered why this wasn't in STL :D

Take a closer look.
I did it and found it in /usr/include/g++-v31/stl_algobase.h beginning at 
line 130. Look there, the Standard C directives min and max gets removed, 
and then replaced by its template functions and some specializations.

Cheers,
Christian Parpart.

p.s.: I also posted that in the .general feed. Hugh? I just looked here 
later ;)


Post a reply to this message

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