R
Ranjay
Hi Everybody,
Suppose i have a function like this
class xx{
int func();
};
main(){
xx x1;
x1.func();
}
Then func() goes into the code segment . pl correct me if i'm wrong .
However if i make it inline like this
class xx{
inline int func();
};
then c++ compiler doc says that fuc() is expanded inline where its
called at x1.func() (something very similar to macros do in c) .
ofcourse the decision to make it inline or not rests with the compiler
based on optimization modes
So if func() would be expanded at the place where its called then does
it makes sense to say that inline functions do not have data segment ??
Please let me know
My thanks in advance .
Thanks
Ranjay
Suppose i have a function like this
class xx{
int func();
};
main(){
xx x1;
x1.func();
}
Then func() goes into the code segment . pl correct me if i'm wrong .
However if i make it inline like this
class xx{
inline int func();
};
then c++ compiler doc says that fuc() is expanded inline where its
called at x1.func() (something very similar to macros do in c) .
ofcourse the decision to make it inline or not rests with the compiler
based on optimization modes
So if func() would be expanded at the place where its called then does
it makes sense to say that inline functions do not have data segment ??
Please let me know
My thanks in advance .
Thanks
Ranjay