Skip to content

CA178 17.11.07 [cmp.alg] Special-case std::strong/weak/partial_order for pointers LWG 3324 #176

@wg21bot

Description

@wg21bot

std::strong_order, weak_order, and partial_order have special cases for floating point, but are missing special casing for pointers (whereas compare_three_way and std::less have the special casing for pointers)

Proposed change:

  1. Change [cmp.alg] bullet 1.4 from
    "Otherwise, strong_ordering(E <=> F) if it is a well-formed expression."
    to
    "Otherwise, strong_ordering(compare_three_way()(E, F)) if it is a well-formed expression."

  2. Change [cmp.alg] bullet 2.4 from
    "Otherwise, weak_ordering(E <=> F) if it
    is a well-formed expression."
    to
    "Otherwise, weak_ordering(compare_three_way()(E, F)) if it is a well-formed expression."

  3. Change [cmp.alg] bullet 3.3 from
    "Otherwise, partial_ordering(E <=> F) if
    it is a well-formed expression."
    to
    "Otherwise, partial_ordering(compare_three_way()(E, F)) if it is a well-formed expression."

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions