AM > I feel the need for an outline specifier [...]
KHB> If I don't want a function to be inlined, well, then
KHB> simply don't write the function body in the class
KHB> decleration. Plain and simple. No special keyword
KHB> needed for that.
AM> Modern compilers and linkers are smart enough
AM> that they will inline everything they see fit, defined
AM> inside or out of the class body.
KH> If the compiler deosn't see the source code,
KH> it cannot inline it, simple.
KH>
KH> But for the linker:
KH> Do you know of any linker that does this?
KH> I would be very surprised and make a deep bow
KH> in front of the guys who managed to do that.
I copied this reply from from the thread
Re: turn off inlining using extern "C", on
comp.lang.c++.moderated:
Heinz Ozwirk:
If you want to prevent functions from being inlined, put them in separate
.cpp (or whatever) files and only include their prototypes in the code
that calls them. The compiler cannot inline them, if it doesn't know what
to inline.
Francis GlassBorow:
Of course it can and good linkers have been managing that for some time.
In future it will become more common as forms of semi-compiled code
become more common. VC++7 has some quite clever features in this area.
//Agent Mulder again:
The conclusion in that thread is that there is no
portable way to ensure that code gets expanded
outline (not inline). It is viewed as a de-optimization
enforced by the programmer. Your hack of taking
the function body out of the class declaration does
not work. Fix it.
-X