declarations. We can't expect to find them in the canonical definition of the class, because that's not where they live. This means we no longer reject real ODR violations with friend declarations, but we weren't consistently doing so anyway. llvm-svn: 216369
16 lines
237 B
C++
16 lines
237 B
C++
struct Y {
|
|
int m;
|
|
double f;
|
|
} y2;
|
|
enum E { e2 };
|
|
|
|
template<typename T>
|
|
struct F {
|
|
int n;
|
|
friend bool operator==(const F &a, const F &b) { return a.n == b.n; }
|
|
};
|
|
|
|
int g() {
|
|
return y2.m + e2 + y2.f + (F<int>{0} == F<int>{1});
|
|
}
|