Skip to content

Usage of noncopyable and -Weffc++ warnings #38

Description

@rbraud

Hi, would it be possible to make the code compile cleanly with -Weffc++? Most of the warnings come from not initializing all class members with initializer lists. However, some of the warnings are about noncopyable. Your implementation doesn't actually prevent anyone from making a copyable object since the deleted copy constructor and assignment operator are only protected, meaning they can still be overridden by derived classes. The only way that I can see to remove every one of the warnings would be to declare these two methods in your classes as "delete" explicitly, I can live with the "has pointer member but does not override..." warnings, as it may not be worth the effort of removing noncopyable entirely. However, it would be really nice if all of the warnings about uninitialized members could be addressed. I can also provide a PR for this, just try it out first with -Weffc++ and let me know what you want to do about noncopyable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions