I have a situation when, as a side effect of data arrival to initialize the base class, the derived class calculates a part of the information that should later be available through its interface. The following gives an idea of ββthe problem using the logical information needed for the information:
class base {
public:
base(some_initialization_data);
};
class derived : public base {
public:
derived()
: base(calc_init_data())
{
}
bool condition_x_occurred() const
{
}
private:
static some_initialization_data calc_init_data()
{
const bool condition_x_occurred = ;
return some_initialization_data(condition_x_occurred);
}
};
, , . . , , , 20 , undefined.
, , . , . , , , , , . , - ?
. , GCC 4.1.2. ++ 03 ( TR1), ++ 11.