L
LuB
Hi,
I know that instance members are instantiated in the order they are
declared.
Does the same hold true for static class members?
Is the following well-defined?
-----------------------------------------------
struct A
{
int a;
};
class B
{
static A a_;
static int b_;
}
....
A B::a_ = { 1 };
// IS *THIS* WELL DEFINED?
int B::b_ = B::a_.a;
-----------------------------------------------
Please pardon any typos ... thanks,
-Luther
I know that instance members are instantiated in the order they are
declared.
Does the same hold true for static class members?
Is the following well-defined?
-----------------------------------------------
struct A
{
int a;
};
class B
{
static A a_;
static int b_;
}
....
A B::a_ = { 1 };
// IS *THIS* WELL DEFINED?
int B::b_ = B::a_.a;
-----------------------------------------------
Please pardon any typos ... thanks,
-Luther