[prev in list] [next in list] [prev in thread] [next in thread]
List: vtkusers
Subject: Fwd: Re: ANSI C++ changes revisited
From: Bill Hoffman <bill.hoffman () kitware ! com>
Date: 2000-04-27 18:53:47
Message-ID: 4.2.0.58.20000427145329.00dd9890 () pop ! nycap ! rr ! com
[Download RAW message or body]
>Date: Thu, 27 Apr 2000 14:25:05 -0400
>To: Eric Chamberland <Eric.Chamberland@giref.ulaval.ca>
>From: Bill Hoffman <bill.hoffman@kitware.com>
>Subject: Re: ANSI C++ changes revisited
>
>The only thing the using std::ostream in a header file does is
>cause errors if you try to use both <iostream> and <iostream.h>
>in the same file. This will cause problems anyway.
>I don't think it is a problem to pollute the global
>namespace with ostream. If you want to use the old iostream.h,
>then compile VTK for the non-ansi iostream.h. If you named
>something else ostream, then you are asking for trouble.
>
>The problem with vtkOstream is that reading the code becomes unclear.
>Is vtkOstream some new class? Is it really ostream?
>The only thing we are preventing is using both the old and new in
>one application, which at least the microsoft compiler does not allow
>anyway.
>
>
>
>At 02:16 PM 4/27/00 -0400, you wrote:
>>Hi,
>>
>>ok I understand the support for old compilers is necessary (we do have
>>to do this here, but they all support - or ignore, the std namespace...)
>>
>>But if you DO a "using std::ostream" in a headear file, one using
>>another "ostream" in is files (form another namespace) will have a
>>problem... so you will support the old compilers, but will cause
>>problems in the new ones.... :-)
>>
>>Maybe the "typedef std::ostream vtkOstream" solution isn't so bad....
>>
>>Or if we could us something like "#define std:: " it would be ok..
>>actually g++ simply "ignore" the std::, but I suppose they did a
>>workaround in the compiler itself...
>>
>>Eric
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo@public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic