Friday, 15 June 2012

c++ - what is _Use_decl_annotations_ meaning -



c++ - what is _Use_decl_annotations_ meaning -

i new sal. want know _use_decl_annotations_ means. have studied msdn: http://msdn.microsoft.com/en-us/library/jj159529.aspx.

"may used on function definition (also known function body) in place of list of annotations in header. when _use_decl_annotations_ used, annotations appear on in-scope header same function used if nowadays in definition has _use_decl_annotations_ annotation."

however, can't in it. when , why should utilize on function?

this annotation instructs static code analysis tool take annotations declaration when analyzing definition of function.

this useful, example, when implement api ships headers , binaries. in scenario typically wish provide user of api same sal annotations implementation uses. prevent duplication of annotations, function declarations in public header file decorated sal annotations , private implementation uses _use_decl_annotations_ reuse same annotations static code analysis.

c++ c driver

No comments:

Post a Comment