Skip to content

Latest commit

 

History

History
61 lines (55 loc) · 1.48 KB

File metadata and controls

61 lines (55 loc) · 1.48 KB
title noinline | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-language
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
noinline
noinline_cpp
dev_langs
C++
helpviewer_keywords
noinline __declspec keyword
__declspec keyword [C++], noinline
ms.assetid f259d55b-dec7-4bde-8cf9-14521e4fdc42
caps.latest.revision 7
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

noinline

Microsoft Specific

__declspec(noinline) tells the compiler to never inline a particular member function (function in a class).

It may be worthwhile to not inline a function if it is small and not critical to the performance of your code. That is, if the function is small and not likely to be called often, such as a function that handles an error condition.

Keep in mind that if a function is marked noinline, the calling function will be smaller and thus, itself a candidate for compiler inlining.

class X {  
   __declspec(noinline) int mbrfunc() {  
      return 0;   
   }   // will not inline  
};  

END Microsoft Specific

See Also

__declspec
Keywords
inline, __inline, __forceinline