Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probably make quick_list destructor exclude all the elements. #5

Open
dmitriano opened this issue Dec 8, 2022 · 0 comments
Open

Probably make quick_list destructor exclude all the elements. #5

dmitriano opened this issue Dec 8, 2022 · 0 comments

Comments

@dmitriano
Copy link
Owner

dmitriano commented Dec 8, 2022

It is not clear enough how its move assignment operator should work

    quick_list& operator = (quick_list&& other) noexcept
    {
        if (this != &other)
        {
            //quick_list cannot free its resources, so it is supposed to be empty
            assert(empty());
            attach(other);
        }
        return *this;
    }

Alternatively, it probably excludes its null element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant