This makes the class much more flexible and doesn't make performing
copies with classes that contain a bitfield member a pain.
Given BitField instances are only intended to be used within unions, the
fact the full storage value would be copied isn't a big concern (only
sizeof(union_type) would be copied anyways).
While we're at it, provide defaulted move constructors for consistency.
Storing signed type causes the following behaviour: extractValue can do overflow/negative left shift. Now it only relies on two implementation-defined behaviours (which are almost always defined as we want): unsigned->signed conversion and signed right shift
This commit:
* Adds a new subproject, audio_core.
* Defines structures that exist in DSP shared memory.
* Hooks up various other parts of the emulator into audio core.
This sets the foundation for a later HLE DSP implementation.
__forceinline is a MSVC extension, which may confuse some people working on the codebase.
Furthermore, the C++ standard dictates that all names which contain adjacent underscores are reserved.
Being able to store BitField within unions requires BitField to be of standard layout, which in turn is only given if the underlying type is also has standard layout.
Sometimes it can be beneficial to use this in places where an explicit cast needs to happen otherwise. By using the evaluation method, it's not necessary anymore to explicitly write the underlying type in this case.