[vtk-developers] Use of std:: in vtk
andrew.amaclean at gmail.com
Mon Dec 14 17:06:39 EST 2009
Personally I don think this is necessary any more. From memory
(admittedly blurred with time) this arose because of the fact that STL
implementations were non uniform across the early compilers. I don't
think there is any need for it now.
>From a stylistic and code checking perspective I much prefer
std::cout to cout or using vtkstd::
I guess the question is how big a change would it be to make vtkstd a
synonym for std and mark it as deprecated to be removed in the release
after next? I think this issue should become something the VTK ARB
On Tue, Dec 15, 2009 at 8:16 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Coming from the itk world, we always use std::cout and std:: for
> string, vector, map, etc. In trying to check in some new examples, my
> pre-commit failed with the message:
> GenerateCubesFromLabels.cxx has used the std:: or vtkstd:: to access streams.
> For example, std::cout or vtkstd::endl.
> For VTK, you must not use a namespace for streams.
> Common/vtkIOStream.h for list of using directives in VTK.
> I'm sure there used to be a good reason for this in the old days, but
> is this restriction still necessary? Also, to use std::string I needed
> to change it to vtkstd::string. It makes one wonder how std::string
> differs from vtkstd::string.
> I did change std::cout to cout, but this is in conflict with itk and
> probably other styles.For instance, I noticed that CMake source code
> uses std::string, vector, map etc.
> I did check in the examples with the required commit check suggestions.
> Powered by www.kitware.com
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> Follow this link to subscribe/unsubscribe:
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney 2006 NSW
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
More information about the vtk-developers