[vtk-developers] vtkStdString vs std::string

David Gobbi david.gobbi at gmail.com
Wed Feb 20 18:31:05 EST 2013


The wrappers treat std::string and vtkStdString identically.
My preference is std::string.

 - David


On Wed, Feb 20, 2013 at 4:23 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Could be related to Wrapping?
>
> On Wed, Feb 20, 2013 at 5:56 PM, Jean-Christophe Fillion-Robin
> <jchris.fillionr at kitware.com> wrote:
>>
>> Hi Folks,
>>
>> What is the advantages of one vs the other? Looking at the current code
>> base, seems both are widely used.
>>
>>
>> $ rm -rf Common/Core/vtkStdString.*
>> $ ack -c -l -h "std\:\:string" | cut -d":" -f2 | awk '{s+=$1} END {print
>> s}'
>> 1583
>> $ ack -c -l -h "vtkStdString" | cut -d":" -f2 | awk '{s+=$1} END {print
>> s}'
>> 2104
>>
>>
>> Are the following reason still valid:
>>     - allow forward declaration hence reducing the number of header
>> inclusion, and also speed compilation.
>>     - shorter symbol name. See [1]
>>
>>
>> As a best practice, should we recommend one vs the other ?
>>
>> Thanks
>> Jc
>>
>> [1] http://www.vtk.org/pipermail/vtkusers/2010-January/105450.html
>>
>> --
>> +1 919 869 8849



More information about the vtk-developers mailing list