File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1950
1950
using namespace A;
1951
1951
using namespace B;
1952
1952
int i = C::x; // OK: \tcode {A::x} (of type \tcode {int} )
1953
- int j = C::y; // ambiguous, \tcode {A::y} or \tcode {B::y}
1953
+ int j = C::y; // ambiguous: \tcode {A::y} or \tcode {B::y}
1954
1954
}
1955
1955
\end {codeblock }
1956
1956
\end {example }
Original file line number Diff line number Diff line change 3202
3202
using namespace B;
3203
3203
using namespace C;
3204
3204
void f2() {
3205
- i = 5; // ambiguous, \tcode {B::C::i} or \tcode {A::i}?
3205
+ i = 5; // ambiguous: \tcode {B::C::i} or \tcode {A::i}?
3206
3206
}
3207
3207
}
3208
3208
void f3() {
3349
3349
}
3350
3350
3351
3351
void f() {
3352
- d1++; // error: ambiguous \tcode {::d1} or \tcode {D::d1}?
3352
+ d1++; // error: ambiguous: \tcode {::d1} or \tcode {D::d1}?
3353
3353
::d1++; // OK
3354
3354
D::d1++; // OK
3355
3355
d2++; // OK: \tcode {D::d2}
Original file line number Diff line number Diff line change 477
477
pd->v++; // OK: only one \tcode {v} (virtual)
478
478
pd->s++; // OK: only one \tcode {s} (static)
479
479
int i = pd->e; // OK: only one \tcode {e} (enumerator)
480
- pd->a++; // error, ambiguous: two \tcode {a}{s} in \tcode {D}
480
+ pd->a++; // error: ambiguous: two \tcode {a}{s} in \tcode {D}
481
481
}
482
482
\end {codeblock }
483
483
\end {example }
544
544
void g() {
545
545
D d;
546
546
B* pb = &d;
547
- A* pa = &d; // error, ambiguous: \tcode {C}'s \tcode {A} or \tcode {B}'s \tcode {A}?
547
+ A* pa = &d; // error: ambiguous: \tcode {C}'s \tcode {A} or \tcode {B}'s \tcode {A}?
548
548
V* pv = &d; // OK: only one \tcode {V} subobject
549
549
}
550
550
\end {codeblock }
Original file line number Diff line number Diff line change 5210
5210
template<int> struct X { };
5211
5211
constexpr A a = 42;
5212
5212
X<a> x; // OK: unique conversion to \tcode {int}
5213
- int ary[a]; // error: ambiguous conversion
5213
+ int ary[a]; // error: ambiguous: conversion
5214
5214
\end {codeblock }
5215
5215
\end {example }%
5216
5216
\indextext {expression|)}
Original file line number Diff line number Diff line change 2277
2277
g( {1.0, 1.0} ); // error: narrowing
2278
2278
2279
2279
void f(B);
2280
- f( {'a', 'b' } ); // error: ambiguous \tcode {f(A)} or \tcode {f(B)}
2280
+ f( {'a', 'b' } ); // error: ambiguous: \tcode {f(A)} or \tcode {f(B)}
2281
2281
2282
2282
struct C {
2283
2283
C(std::string);
You can’t perform that action at this time.
0 commit comments