wrote:
> Inline before a function definition is just a request to the compiler
> to make the function inline.
> The compiler may or maynot make it inline..
> My question is ..is there any way by which I can find at runtime
> whether the particular function which is marked as inline,is made
> inline or is treated like other function by the compiler ?
Not in any portable way. In any case, why do you need to find out at
_runtime_?
If you just wanted to find out at compile time, there are several
(nonportable) things you could do. First, many compilers will output
the assembly version of your compiled program, so you can manually
check. Of course, you would have to check again every time you
recompiled the program, since any changes could affect whether a
particualar inline request was honored by the compiler.
Second, some compilers will emit a warning if they fail to honor an
inline request. For example, in gcc, the "-Winline" command option
will emit a warning if the compiler does not inline a function that was
declared inline.
But that brings me back to my original question - why do you want to
find out at _runtime_?
Best regards,
Tom
[ See
http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]