forcing compiler to consider inline function inline.

A

Ajay

Hi all,
I want to force that compiler take the function INLINE if i declare it
inline.I know there is some macro to force the compiler to take the
function as inline..but unfortunately i dont know the name.Please tell
if there is any other way to do so if you know.
Thanks in advance. Ajay
 
T

Tomás

Ajay posted:
Hi all,
I want to force that compiler take the function INLINE if i declare it
inline.I know there is some macro to force the compiler to take the
function as inline..but unfortunately i dont know the name.Please tell
if there is any other way to do so if you know.
Thanks in advance. Ajay

Something like:

__forceinline


-Tomás
 
T

Tomás

Ajay posted:
Have you used it yourself.?Are you sure.??Please reply fast.thank you.

Never used it myself, but I vaguely remember seeing something like it in
a compiler's helpbook.

Note that it's a compiler extension, it's nothing to do with the C++
programming language.


-Tomás
 
G

Gavin Deane

Tomás said:
Ajay posted:


Never used it myself, but I vaguely remember seeing something like it in
a compiler's helpbook.

Note that it's a compiler extension, it's nothing to do with the C++
programming language.

Indeed there is _no_ way to do it in standard C++ so, to the OP: you
will need to look in your compiler documentation or ask a group
dedicated to your compiler because the answer, if there is one, is
likely to be different depending on what compiler you are using.

Gavin Deane
 
P

Pete Becker

Ajay said:
Hi all,
I want to force that compiler take the function INLINE if i declare it
inline.I know there is some macro to force the compiler to take the
function as inline..but unfortunately i dont know the name.Please tell
if there is any other way to do so if you know.
Thanks in advance. Ajay

The C++ language definition says that inline is a hint to the compiler
(as to inlining itself; it also has some semantic consequences).
Anything else is compiler-specific, and is best discussed in a
compiler-specific newsgroup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,260
Messages
2,571,038
Members
48,768
Latest member
first4landlord

Latest Threads

Top