Capital-Asterisk / longeronpp

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

Call to constructor of base class in operator= #1

Closed jonesmz closed 2 years ago

jonesmz commented 2 years ago

https://github.com/Capital-Asterisk/longeronpp/blob/133dec40415b1382b6312fea7e4b22f115efe046/src/longeron/id_management/refcount.hpp#L33

    // Allow move assign only if all counts are zero
    RefCount& operator=(RefCount&& move)
    {
        assert(only_zeros_remaining(0));
        base_t(std::move(move));
        return *this;
    }

Should be

    // Allow move assign only if all counts are zero
    RefCount& operator=(RefCount&& move)
    {
        assert(only_zeros_remaining(0));
        base_t::operator=(std::move(move));
        return *this;
    }
Capital-Asterisk commented 2 years ago

Merged in #2