0

Is there any way to inline just some selective calls to a particular function not all of them? by function I also mean class operators like assignment operator, constructors like copy constructor. The only form I know is declaring function as such at beginning and that's supposed to effect all calls to that function and it even doesn't work for copy constructor cause that's generated automatically by compiler. After all maybe it'd be good to know basically how much authority for making a function inline or not is there for the programmer under C++ standards.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Narue
0

>Is there any way to inline just some selective calls to a particular function not all of them?
Manually inline it. Of course, that defeats the purpose of a function, so I wouldn't generally recommend it.

>how much authority for making a function inline or not is there for the programmer under C++ standards
Zero. You can either define a member function in the class definition, or qualify it as inline explicitly. But both of those are nothing more than hints; the compiler is not obligated to actually make the function inline.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.