Capital-Asterisk / longeronpp

"Longeron++" C++17 library for simple memory-efficient or 'data-oriented' structures
MIT License
32 stars 4 forks source link

0.2.0+ Plans #17

Open Capital-Asterisk opened 7 months ago

Capital-Asterisk commented 7 months ago

More Bit stuff

Different types of BitView and BitVector:

Refcount improvements

Current one is ugly.

Don't just return a bool or int. Return a struct with a bool reachedZero and maybe a current ref count. Makes it obvious that the condition is that if the ref count reaches zero:


if (refcount.release(std::move(id)).reachedZero)
{
    // Kill the instance for real
}