S
Steven T. Hatton
I know this is, to some extent, implementation dependent, but since the
Standard specifies an inline specifier, there must be some "reasonable
assumptions" I can make about what should happen when I inline a function.
Suppose I have something like this (which, BTW is currently broken in
Qt-4-rc1):
inline QWidget* vBox(QWidget* parent) {
QWidget* box = new QWidget(parent);
QVBoxLayout* boxLayout = new QVBoxLayout(box);
box->setLayout(boxLayout);
return box;
}
Clearly, there will be a lot happening between the entry point, and the
return from the function. My understanding is that all of the object code
involved will not be inlined, and only the compiled representation of the
function calls will be placed inline. Is this correct?
Standard specifies an inline specifier, there must be some "reasonable
assumptions" I can make about what should happen when I inline a function.
Suppose I have something like this (which, BTW is currently broken in
Qt-4-rc1):
inline QWidget* vBox(QWidget* parent) {
QWidget* box = new QWidget(parent);
QVBoxLayout* boxLayout = new QVBoxLayout(box);
box->setLayout(boxLayout);
return box;
}
Clearly, there will be a lot happening between the entry point, and the
return from the function. My understanding is that all of the object code
involved will not be inlined, and only the compiled representation of the
function calls will be placed inline. Is this correct?