P
Peter
I know the order of construction of member and base class objects.
My question is the following:
Is the order of evaluation of argument lists for these constructors
also defined?
E.g. can I assume that the following code is exceptions safe?
Assuming that the constructor of A, B or C may throw?
Can I assume that B is created after the constructor of m_sA has been
called?
struct D
{ std::auto_ptr<A> m_sA;
std::auto_ptr<B> m_sB;
std::auto_ptr<C> m_sC;
D(void)
:m_sA(new A),
m_sB(new B),
m_sC(new C)
{
}
};
My question is the following:
Is the order of evaluation of argument lists for these constructors
also defined?
E.g. can I assume that the following code is exceptions safe?
Assuming that the constructor of A, B or C may throw?
Can I assume that B is created after the constructor of m_sA has been
called?
struct D
{ std::auto_ptr<A> m_sA;
std::auto_ptr<B> m_sB;
std::auto_ptr<C> m_sC;
D(void)
:m_sA(new A),
m_sB(new B),
m_sC(new C)
{
}
};