Skip to content

elemsof should be renamed as countof #209

Open
@chqrlie

Description

@chqrlie

countof is already used in many existing packages in C, C++ and other languages, while elemsof seems unique to C2.

The Standard C Committee has approved the addition of _Countof in the next version of the C Standard. A survey was conducted to determine the best choice of word for the operator that evaluates to the number of elements in an array, and countof/_Countof emerged as a clear winner: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3440.htm

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