ANSI C++ changes revisited

Jonathan M. Gilligan jonathan.gilligan at vanderbilt.edu
Thu Apr 27 15:38:30 EDT 2000


As you all are discussing and working out the important questions of 
supporting both standard and non-standard C++ compilers and libraries, I 
would recommend an couple of recent articles.

First, "Deep C++: Reserved Names," by Robert Schmidt on Microsoft's MSDN 
(http://msdn.microsoft.com/voices/deep04202000.asp) discusses ways of 
dealing with reserved names and the std namespace. The article is not 
Windows-specific, although it levels a fair bit of criticism at Microsoft 
for their failure to deal well with reserved names and the std namespace in 
Visual C++ and the Windows Platform SDK.

Perhaps the material in the article is old-hat to you all, but I found it 
interesting and found many of its points resonated with what I am reading 
now in the discussion here.

Here is another possible direction to resolve the "using" vs "typedef" dilemma:

If all of VTK were wrapped in a vtk namespace when ANSI compatibility was 
turned on, then would this not help encapsulate the using std::ostream type 
stuff. My understanding is that

namespace vtk
{
	using std::ostream
...
}

would allow vtk to use ostream to mean std::ostream without hurting anyone 
outside the vtk namespace.

Finally, on a cautionary note, Al Stevens recently wrote a column in Dr. 
Dobbs this month (May 2000) on the cost of using the standard C++ library 
if you don't need its features. This should reinforce the decision by the 
VTK team to make ANSI compatibility optional even with compliant compilers 
and libraries.

Just my thoughts. Hope they're useful.

Jonathan

--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list