Title
Overload ambiguities for builtin ?: prototypes
Status
nad
Section
12.5 [over.built]
Submitter
Jason Merrill

Created on 1997-09-25.00:00:00 last changed 323 months ago

Messages

Date: 2014-03-03.00:00:00

I understand that the lvalue-to-rvalue conversion was removed in London. I generally agree with this, but it means that ?: needs to be fixed:

Given:

    bool test;
    Integer a, b;
    test ? a : b;
What builtin do we use? The candidates are
    operator ?:(bool, const Integer &, const Integer &)
    operator ?:(bool, Integer, Integer)
which are both perfect matches.

(Not a problem in the C++11 FDIS, but misleading.)

Rationale: The description of the conditional operator in 7.6.16 [expr.cond] handles the lvalue case before the prototype is considered.

History
Date User Action Args
1997-09-25 00:00:00admincreate