[vtk-developers] Added __WRAP__ preprocessor macro to replace BTX

Sean McBride sean at rogue-research.com
Tue Oct 12 12:48:57 EDT 2010


On Tue, 12 Oct 2010 10:21:23 -0600, David Gobbi said:

>Inspired by the "#ifndef__GCCXML__" blocks in ITK, I have added a new
>"__WRAP__" preprocessor symbol that can be used to block off code:
>
>#if !defined(__WRAP__)
>// code exclusion section
>#endif

Instead of "__WRAP__", something like "VTK_WRAP" would be better
because, from the 2003 C++ Standard:

17.4.3.2.1 Global names [lib.global.names]
Certain sets of names and function signatures are always reserved to the
implementation:

 - Each name that contains a double underscore (_ _) or begins with an
underscore followed by an uppercase letter is reserved to the
implementation for any use.

 - Each name that begins with an underscore is reserved to the
implementation for use as a name in the global namespace.

See also:

<http://stackoverflow.com/questions/228783/what-are-the-rules-about-
using-an-underscore-in-a-c-identifier>

<https://www.securecoding.cert.org/confluence/display/seccode/DCL37-C.+Do
+not+use+identifiers+that+are+reserved+for+the+implementation>

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the vtk-developers mailing list