Member Functions in class scope are auto inlined?

A

Andy

Someone supposedly knowledgeable tells me that any member function
declared in class scope is automatically inlined. I am a little
skeptical about this claim. Is this true (I know it cannot be ... I
might decide to write a 1000 line function in the class scope).

Cheers,
Andy
 
J

Jeff Schwab

Andy said:
Someone supposedly knowledgeable tells me that any member function
declared in class scope is automatically inlined. I am a little
skeptical about this claim. Is this true (I know it cannot be ... I
might decide to write a 1000 line function in the class scope).

It is just as though you had used the "inline" keyword in the
declaration. Of course, even then, the compiler may ignore your request
to inline the function.

-Jeff
 
J

Jeff Schwab

Jeff said:
It is just as though you had used the "inline" keyword in the
declaration. Of course, even then, the compiler may ignore your request
to inline the function.
 

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

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top