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 1979
1979
using namespace A;
1980
1980
using namespace B;
1981
1981
int i = C::x; // OK: \tcode {A::x} (of type \tcode {int} )
1982
- int j = C::y; // ambiguous, \tcode {A::y} or \tcode {B::y}
1982
+ int j = C::y; // ambiguous: \tcode {A::y} or \tcode {B::y}
1983
1983
}
1984
1984
\end {codeblock }
1985
1985
\end {example }
Original file line number Diff line number Diff line change 3171
3171
using namespace B;
3172
3172
using namespace C;
3173
3173
void f2() {
3174
- i = 5; // ambiguous, \tcode {B::C::i} or \tcode {A::i}?
3174
+ i = 5; // ambiguous: \tcode {B::C::i} or \tcode {A::i}?
3175
3175
}
3176
3176
}
3177
3177
void f3() {
3318
3318
}
3319
3319
3320
3320
void f() {
3321
- d1++; // error: ambiguous \tcode {::d1} or \tcode {D::d1}?
3321
+ d1++; // error: ambiguous: \tcode {::d1} or \tcode {D::d1}?
3322
3322
::d1++; // OK
3323
3323
D::d1++; // OK
3324
3324
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 5188
5188
template<int> struct X { };
5189
5189
constexpr A a = 42;
5190
5190
X<a> x; // OK: unique conversion to \tcode {int}
5191
- int ary[a]; // error: ambiguous conversion
5191
+ int ary[a]; // error: ambiguous: conversion
5192
5192
\end {codeblock }
5193
5193
\end {example }%
5194
5194
\indextext {expression|)}
Original file line number Diff line number Diff line change 2210
2210
g( {1.0, 1.0} ); // error: narrowing
2211
2211
2212
2212
void f(B);
2213
- f( {'a', 'b' } ); // error: ambiguous \tcode {f(A)} or \tcode {f(B)}
2213
+ f( {'a', 'b' } ); // error: ambiguous: \tcode {f(A)} or \tcode {f(B)}
2214
2214
2215
2215
struct C {
2216
2216
C(std::string);
You can’t perform that action at this time.
0 commit comments