[vtkusers] vtkStdString vs vtkstd::string
Bill Lorensen
bill.lorensen at gmail.com
Thu Jan 14 15:48:16 EST 2010
It's not a problem with those compilers. It might have been VS5.
Bill
On Thu, Jan 14, 2010 at 3:30 PM, David Thompson <dcthomp at sandia.gov> wrote:
>> As a macro hater, can I suggest "namespace aliasing" instead?
>> Here is what I mean with a full example (just tested with gcc 4.4.1)
>>
>> #include <iostream>
>> int main()
>> {
>> // define vtkstd as an alias to std
>> namespace vtkstd=std;
>> ...
>
> Hi all,
>
> Since Berk just formally announced that MSVC{6, 7.0} and BCC 5.6 are no
> longer supported (thanks, Kitware!), do we need vtkstd at all? I don't
> remember what compilers had problems with the STL being the global namespace
> instead of std::, but perhaps all of the supported compilers have it in
> std:: now? If so, shouldn't we get rid of the namespace macros/aliasing
> altogether?
>
> David
>
>
>
>> On Thu, Jan 14, 2010 at 9:09 AM, Jeff Baumes <jeff.baumes at kitware.com>
>> wrote:
>>>
>>> On Wed, Jan 13, 2010 at 7:15 PM, David Doria <daviddoria+vtk at gmail.com>
>>> wrote:
>>>>
>>>> The doc for vtkStdString says:
>>>>
>>>> Wrapper around vtkstd::string to keep symbols short.
>>>> vtkStdString derives from vtkstd::string to provide shorter symbol
>>>> names than basic_string<...> in namespace std given by the standard
>>>> STL string.
>>>>
>>>> But I guess I don't understand what that means. When should one use
>>>> vtkStdString vs vtkstd::string?
>>>
>>> I don't know the answer to your question, but it would be nice if all
>>> these pointed to the same underlying thing: std::string. I'm assuming
>>> the older compilers are responsible for the need for short symbols.
>>> Perhaps the compiler deprecation that Berk sent recently will allow us
>>> to eventually replace all vtkStdString and vtkstd::string with
>>> std::string?
>>>
>>> We are thinking to maybe start testing the use of std::string in the
>>> examples first.
>>>
>>> Longer term, we could do something like the following:
>>>
>>> typedef std::string vtkStdString;
>>> #define vtkstd std
>>>
>>> So the old type names could still be used, but we could in time
>>> replace all occurrences in VTK to just use std::string. Eventually the
>>> old aliases could be removed.
>>>
>>> But there could be unforeseen issues with this idea that force us to
>>> continue using vtkStdString/vtkstd::string.
>>>
>>> Jeff
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>
>>
>>
>> --
>> François Bertel, PhD | Kitware Inc. Suite 204
>> 1 (518) 371 3971 x113 | 28 Corporate Drive
>> | Clifton Park NY 12065, USA
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list