Quote:Original post by Antheus
Since you mention DWORDS, it's likely you're talking about C++.
*** Source Snippet Removed ***
Nice solution, but...
Quote:
You can also change the types of individual A,B,C,D to be different from 8-bit int, perhaps 16-bit for D, to allow more builds.
And watch it blow up?
Quote:But the best thing is, there is no overhead, there is no storage, and no #defines.
Maybe 4 times as much storage than the macro solution.
Quote:You can optionally make all methods static.
To what effect?
Quote:Excercises left for the reader:
- overload << operator
- overload comparison operators
etc...
Comparison operators. Forgot that you have to define a different type for every version?
For DWORDS, comparison operators are built in.