/Ob (Inline Function Expansion)
For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
Controls inline expansion of functions.
Disables inline expansions. By default, expansion occurs at the compiler's discretion on all functions, often referred to as auto-inlining.
The default value. Allows expansion of functions marked as
__forceinline, and any other function that the compiler chooses.
This option requires that you enable optimizations using /O1, /O2, /Ox, or /Og.
The compiler treats the inline expansion options and keywords as suggestions. There is no guarantee that any function will be expanded inline. You can disable inline expansions, but you cannot force the compiler to inline a particular function, even when using the
Information that is gathered from profiling test runs overrides optimizations that would otherwise be in effect if you specify /Ob, /Os, or /Ot. For more information, see Profile-Guided Optimizations.
Open the project's Property Pages dialog box. For details, see Working with Project Properties.
Expand Configuration Properties, C/C++, and select Optimization.
Modify the Inline Function Expansion property.