<div dir="ltr">std::string for the majority of STL implementation is just a typedef of std::basic_string<Type,Traits,Allocator> with Type = char. </div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 20, 2013 at 10:42 PM, David Thompson <span dir="ltr"><<a href="mailto:david.thompson@kitware.com" target="_blank">david.thompson@kitware.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi JC,<br>
<br>
At least one reason vtkStdString exists is because old versions of SunCC could not compile std::map<std::string,std::string> as the template expansions resulted in class names exceeding a fixed string length in the compiler (strings were templated on character type in Sun's STL). That is no longer a concern and when we dropped support for old compilers a while back, std::string became allowed.<br>


<br>
        David<br>
<div class="HOEnZb"><div class="h5"><br>
On Feb 20, 2013, at 5:56 PM, Jean-Christophe Fillion-Robin <<a href="mailto:jchris.fillionr@kitware.com">jchris.fillionr@kitware.com</a>> wrote:<br>
<br>
> Hi Folks,<br>
><br>
> What is the advantages of one vs the other? Looking at the current code base, seems both are widely used.<br>
><br>
><br>
> $ rm -rf Common/Core/vtkStdString.*<br>
> $ ack -c -l -h "std\:\:string" | cut -d":" -f2 | awk '{s+=$1} END {print s}'<br>
> 1583<br>
> $ ack -c -l -h "vtkStdString" | cut -d":" -f2 | awk '{s+=$1} END {print s}'<br>
> 2104<br>
><br>
><br>
> Are the following reason still valid:<br>
>     - allow forward declaration hence reducing the number of header inclusion, and also speed compilation.<br>
>     - shorter symbol name. See [1]<br>
><br>
><br>
> As a best practice, should we recommend one vs the other ?<br>
><br>
> Thanks<br>
> Jc<br>
><br>
> [1] <a href="http://www.vtk.org/pipermail/vtkusers/2010-January/105450.html" target="_blank">http://www.vtk.org/pipermail/vtkusers/2010-January/105450.html</a><br>
><br>
> --<br>
> <a href="tel:%2B1%20919%20869%208849" value="+19198698849">+1 919 869 8849</a><br>
</div></div><div class="im HOEnZb">> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
><br>
<br>
</div><span class="HOEnZb"><font color="#888888">David Thompson<br>
R&D Engineer – Kitware, Inc.<br>
<a href="mailto:david.thompson@kitware.com">david.thompson@kitware.com</a><br>
<a href="tel:%28919%29869-8868" value="+19198698868">(919)869-8868</a><br>
Suite G-4<br>
101 E. Weaver St.<br>
Carrboro, NC 27510<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Robert Maynard
</div>