C
Christopher Benson-Manica
I recently had an issue that I'll try to condense for your reviewing
pleasure:
class A
{
protected:
my_type Member;
public:
A() {/* initialize Member */}
};
class B : public A
{
private:
my_other_type MyMember;
public:
B() : A(), MyMember(Member) {}
};
This compiled, but crashed at run time. Was it because the order in
which the actions in the initializer list are taken is unspecified?
pleasure:
class A
{
protected:
my_type Member;
public:
A() {/* initialize Member */}
};
class B : public A
{
private:
my_other_type MyMember;
public:
B() : A(), MyMember(Member) {}
};
This compiled, but crashed at run time. Was it because the order in
which the actions in the initializer list are taken is unspecified?