[vtk-developers] STL policy

David Thompson dcthomp at sandia.gov
Mon Jan 20 12:52:08 EST 2003


> Some compilers don't support namespace std.  In CMake, we just define
> "std" as an empty macro because it is an application, but VTK is a
> library.  We cannot force the definition of such a non-vtk-prefixed macro
> upon user code.  Instead, we use "vtkstd" which is either defined to "std"
> or empty depending on the compiler.
How many compilers is this? Are they the only ones available
on some platform? I know some really old versions of gcc were this
way, are there others? With every one of these little exceptions
to standard programming practice, we pump up the learning curve
to both using and contributing to VTK. If there's any way to avoid
some of these workarounds, it would be nice to pursue them.

For instance, how about a "mogrifier" program that converts standard
source to source that will compile on some given platform? It would
be easy to do for std:: (a sed script or a simple regex call) and
CMake could implement some SOURCE_MOGRIFIER(Program, Sources) rule
that would do the transform. It might not handle every workaround,
but even if it worked for a few, it could make life much better.

		David






More information about the vtk-developers mailing list