[vtk-developers] Unique enum values

Bill Lorensen bill.lorensen at gmail.com
Wed Mar 14 20:49:45 EDT 2012


namespaces are great. ITK has used them for over 10 ten years. But I'm
not sure how to use them just for enum's.


On Wed, Mar 14, 2012 at 5:31 PM, David E DeMarle
<dave.demarle at kitware.com> wrote:
> Is there any reason not to use namespaces anymore?
>
> On Mar 14, 2012 7:21 PM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
>>
>> Folks,
>>
>> A user recently reported that an enum value "DIFFERENCE" was defined
>> by Visual Studio 2008. This caused compilation errors in the vtk class
>> that defined and used it.
>>
>> VTK classes that define enums do not follow a consistent convention.
>> Some use a VTK_ prefix, others do not.
>>
>> Without a unique prefix VTK may have compilation issues if, in the
>> future, a compiler decides to define one of the values that we have
>> created.
>>
>> I propose, that for VTK6, we establish a convention that enum values
>> always have a prefix VTK_.
>>
>> About 370 vtk*.h files have an enum. I'm willing to take a stab at
>> applying this convention throughout VTK.
>>
>> Bill
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>
>



-- 
Unpaid intern in BillsBasement at noware dot com



More information about the vtk-developers mailing list