By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,898 Members | 2,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,898 IT Pros & Developers. It's quick & easy.

Member Functions in class scope are auto inlined?

P: n/a
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
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Andy wrote:
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

Jul 22 '05 #2

P: n/a
Jeff Schwab wrote:
Andy wrote:
Someone supposedly knowledgeable tells me that any member function
declared
<Assumed> you meant "defined" </>
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.


Jul 22 '05 #3

P: n/a
Jeff Schwab <je******@comcast.net> wrote in message news:<Ha********************@comcast.com>...
Jeff Schwab wrote:
Andy wrote:
Someone supposedly knowledgeable tells me that any member function
declared
<Assumed> you meant "defined" </>
Sorry, I meant defined. Declared is non-sense but you got the intended sense.
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.

Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.