Skip to content

[libc++] __desugars_to_v doesn't recognize const arguments, leading to missed optimizations #155364

@philnik777

Description

@philnik777

A simple example is

auto test(int* first, int* last, const int* first2) {
  return std::equal(first, last, first2, std::less<int>());
}

less<int> doesn't get recognized here simply because the second pointer argument is const. We should fix that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions