I want to force a little function not to be compiled as inline function even if it’s very simple. I think this is useful for debug purpose. Is there any keyword to do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Visual Studio 2010,
__declspec(noinline)tells the compiler to never inline a particular member function, for instance:edit: Additionally, when compiling with
/clr, functions with security attributes never get inlined (again, this is specific to VS 2010).I don’t think it will prove at all useful at debugging, though.