Skip to content

Inconsistent parameter names for erase members of unordered containers #8904

@jwakely

Description

@jwakely

The associative containers and the flat maps and sets all have:

    constexpr size_type erase(const key_type& x);
    template<class K> constexpr size_type erase(K&& x);

But the unordered containers have k and x for the same functions:

    constexpr size_type erase(const key_type& k);
    template<class K> constexpr size_type erase(K&& x);

This seems unnecessarily inconsistent. Either the unordered should use k for both (to be locally consistent), or use x for both (to be globally consistent).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-BugPresentational errors and omissions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions