ANSI C++ changes revisited

Bill Hoffman bill.hoffman at kitware.com
Thu Apr 27 13:15:10 EDT 2000


Peter, this is exactly what we have done.  

#ifdef VTK_USE_ANSI_STDLIB
At 06:59 PM 4/27/00 +0200, Peter.Vanroose at esat.kuleuven.ac.be wrote:

>Actually, the most flexible solution (which I would advocate) is not to
>chose for either "std::ostream" or "using std" in your source files, but
>instead place a conditional "using std::ostream" in a header file that
>is included anywhere.
>
>E.g., one could have a file vtk_iostream.h that says (for example :-)
>
>#if defined(WIN32) || defined(I_WANT_STD) && !(__GNUC__ < 3)
>#include <iostream>
>using std::ios;
>using std::cin;
>using std::cout;
>(etc)
>#else
>#include <iostream.h>
>#endif
>
>With the only extra discipline that you always have to include vtk_iostream.h
>instead of iostream.h, this makes it completely transparant and user-selectable
>which of the two forms are used throughout your code.  And for any compiler.

--------------------------------------------------------------------
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 at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list