I want to inline a function operator (part of a functor class) that does a
push_back on a list container.
Would the compiler inline this method or not? How can I tell?
Don't know. The "inline" keyword is a hint to the compiler. It may
or may not expand a function in line if you define it with the
"inline" keyword. It may or may not expand a function in line even if
you don't define it with the "inline" keyword. It is completely
compiler specific.
As to how you can tell whether or not a particular function was
actually expanded in line, that's also compiler specific.
Since the method "push_back" can throw an exception, does that make a
difference as to how the compiler determines if the function is inline'able
or not?
Thanks.
All issues about whether or not a compiler decides to expand a
specific compiler in line are compiler specific. The only place you
can get answers to these questions is in a support group for that
specific compiler. And then they would not necessarily apply to other
compilers, a different version or your compiler, or even your compiler
with different options.
--
Jack Klein
Home:
http://JK-Technology.Com
FAQs for
comp.lang.c
http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++
http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq