Skip to content

Lvalue transformation not ignored when parameter is a const-reference #9879

@RealLitb

Description

@RealLitb
mannequin
Bugzilla Link 9507
Resolution FIXED
Resolved on Jun 05, 2011 01:16
Version trunk
OS Linux
CC @DougGregor

Extended Description

This should be ambiguous (the array to pointer conversion for the first candidate should not make the candidate worse than the second one):

void f(int * const&);
void f(int const(&)[1]);

int main() {
int n[1];
f(n);
}

Clang takes the second one. If we make the parameter of the first a "int *", Clang behaves as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++11

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions