[vtk-developers] [vtkusers] STL in VTK Header Files

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Jun 8 08:59:11 EDT 2009


Maybe an easier option would be for the checker to ignore std headers if
there's a comment next to the include line as under:

#include<vtkstd/vector> // STL include

This will ensure that the developer has give at least a moment's pause for
the include and knows what he's doing (at least on a very good day).

Utkarsh

On Mon, Jun 8, 2009 at 8:39 AM, Dave Partyka <dave.partyka at kitware.com>wrote:

> Good point.
>
>
> On Sat, Jun 6, 2009 at 1:28 PM, Mathieu Malaterre <
> mathieu.malaterre at gmail.com> wrote:
>
>> On Fri, Jun 5, 2009 at 10:42 PM, Dave Partyka<dave.partyka at kitware.com>
>> wrote:
>> > Hi everyone,
>> > A new CVS commit check has been added to prevent commits of VTK header
>> files
>> > that contain STL includes. Exceptions can be added by contacting myself
>> or
>> > Brad King.
>> > I also want to give a friendly reminder that the VTK coding standards
>> (VTK
>> > has coding standards???) provide guidelines for using STL in VTK and
>> require
>> > that STL not be used in header files. See the following for more
>> information
>> > or feel free to ask me if you have any questions.
>> > VTK Coding Standards:
>> > http://www.vtk.org/Wiki/VTK_Coding_Standards
>> > VTK FAQ regarding STL
>> > http://www.vtk.org/Wiki/VTK_FAQ#Can_I_use_STL_with_VTK.3F
>>
>> As a side note, I think this FAQ is completely obsolete. At least it
>> does not reflect current VTK CVS, since the integration of kwsys,
>> where now it is recommended to do:
>>
>> #include <vtksys/ios/sstream>
>>
>> instead of
>>
>> #include <vtkstd/sstream>
>>
>> kwsys provide -among other things- a fallback implementation for
>> *stringstream.
>>
>> Ref:
>> $ grep -r vtksys * | grep "/ios\|/stl" | wc
>>    330     716   21935
>>
>> 2cts
>> --
>> Mathieu
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20090608/be7986d0/attachment.html>


More information about the vtk-developers mailing list