New MFBT features: enum underlying type and enum classes

2012-08-09 Thread Aryeh Gregor
Support just landed for two new C++11 features in MFBT: https://bugzilla.mozilla.org/show_bug.cgi?id=751554 They're described in this paper: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf In brief, this lets you do two new things. One is you can use MOZ_ENUM_TYPE() to

Re: New MFBT features: enum underlying type and enum classes

2012-08-09 Thread Aryeh Gregor
On Thursday, August 9, 2012 3:05:56 PM UTC+3, Ted Mielczarek wrote: Did you mean VC++ 2010 or 2012? There's no version called 2011. (VC 2010 is VC 10.0, and VC 2012 is VC 11.0, confusingly.) I meant Visual Studio 11, based on this:

Re: New MFBT features: enum underlying type and enum classes

2012-08-09 Thread David Rajchenbach-Teller
On 8/9/12 11:29 AM, Aryeh Gregor wrote: The other is to define enum classes, a.k.a. strongly-typed or scoped enumerations. This is done as follows: [...] That sounds great! Perhaps, at some point, we will want to adapt xpidl to take advantage of this. Also, with this new feature, should we