D
struct A {};
struct B {
constexpr B(A& a) : x(1) {}
constexpr B(B const&) : x(2) {}
int x;
};
struct C : A, B {
constexpr C() : A(), B(*this) {}
};
static_assert(C{}.x != 2);
Size: a a a
D
struct A {};
struct B {
constexpr B(A& a) : x(1) {}
constexpr B(B const&) : x(2) {}
int x;
};
struct C : A, B {
constexpr C() : A(), B(*this) {}
};
static_assert(C{}.x != 2);
CD
D
CD
D
D
CD
Д
LA
s1 == s2
Д
s1 == s2
LA
c_str()
Д
c_str()
Д
CD
Д
CD
d
К
C