inline warning on borland C++

B

bob

Hi,

when compiling source with borland c++ builder, the compiler issues the
following warning....

"functions taking class by-value arguments are not expanded inline"


can anybody tell me why? I mean, whats the difference between by value
and reference arguments wrt inlining?


not important, im just curious.

thanks

G
 
V

Victor Bazarov

when compiling source with borland c++ builder, the compiler issues
the following warning....

"functions taking class by-value arguments are not expanded inline"


can anybody tell me why? I mean, whats the difference between by value
and reference arguments wrt inlining?

Somebody in one of 'borland.public.cpp*' newsgroups might be able
to help. Try them.

V
 
D

David Harmon

On 2 Nov 2006 07:50:44 -0800 in comp.lang.c++, "(e-mail address removed)"
"functions taking class by-value arguments are not expanded inline"

can anybody tell me why? I mean, whats the difference between by value
and reference arguments wrt inlining?

Passing the argument by value means a new copy is made. For a class
instance, the copy constructor is used, which could lead to a
potentially large amount of work being done. I _guess_ that somebody
figured that it just wasn't worth it to potentially put that inline.
 

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
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top