-
Notifications
You must be signed in to change notification settings - Fork 7
Description
@shelby3 Another C++ mess:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0022r0.html
We need to think about this carefully in light of wanting to use Pony style references. The immediate solution that occurs to be is that we need a special "bit-reference" type that encodes a bit-shift and mask, so you would effectively encode an address, and a start and stop bit range:
struct bitReference {
*word address,
int shift
}
where the dereference operation would be:
((*bitref.word) >> shift) & 1
The real reason I think C++ fails, is because it actually uses the concrete dereference '*' directly, instead of implementing Stepanov's Readable, Writeable, Mutable Concepts. With dereference becoming a type-class you can totally avoid proxy iterators. It is probably too big a change with all that code already out there for C++...