BitFields
BitFields copied to clipboard
https://github.com/dotnet/corefx/issues/12425 [BEXTR](http://www.felixcloutier.com/x86/BEXTR.html) [UBFX](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489f/Cjahjhee.html)
https://github.com/dotnet/csharplang/issues/686
Using the "usual" sample code: ```cs struct DoubleView { enum BitFields { Fraction = 11, Exponent = 52, Sign = 1, } } ``` In the light bulb is only...
To make BitX more as number Value should not be public but private / internal, any conversion should happen with cast operations.
This works correctly: ```cs Bit3 b3 = 99; ``` I got the expected error: "Constant value '99' cannot be converted to a 'Bit3'" but this passes: ```cs Bit3 b3 =...
```cs public DoubleView(Bit52 faction, Bit11 exponent, Bit1 Sign) { Value = 0; Value |= (fraction & FractionMask)
Exception thrown when attempting to generate bit-fields without any enum members
There are mixed new lines in generated source codes.