W
Wu Shaohua
Hi Guys,
1. As we know usually we should not define a constructor as inline. I also
learned if we define a member function inside the class this member function
will be automatically be inline'ed. My question is:
If I define a constructor (including its body) or another large member
function inside the class, the constructor or the member function is inline
or not? why?
2. I learned that if the member function is big we should not define it as
inline. Can anyone tell me how large that a member function should not be
inline? I suppose it depends on different compiler. I want to know clearly
when I should use inline and when should not.
Thanks in advance!
Sincerely
Wu
1. As we know usually we should not define a constructor as inline. I also
learned if we define a member function inside the class this member function
will be automatically be inline'ed. My question is:
If I define a constructor (including its body) or another large member
function inside the class, the constructor or the member function is inline
or not? why?
2. I learned that if the member function is big we should not define it as
inline. Can anyone tell me how large that a member function should not be
inline? I suppose it depends on different compiler. I want to know clearly
when I should use inline and when should not.
Thanks in advance!
Sincerely
Wu