Skip to content

Add empty method for r_vector classes. #182

Closed
@jimhester

Description

@jimhester

The C++ core guidelines recommend using empty() methods where available, because this makes the containers more generic, e.g. you don't have to know that an empty container means the size is 0.

https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#t143-dont-write-unintentionally-non-generic-code

We should add empty() methods that return size() > 0.

We should probably use empty() rather than is_empty() to match the std::vector APIs, when in doubt I have been trying to stick to that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions