Support for XML Documentation in native C++ code - by Adam Badura

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 603872 Comments
Status Closed Workarounds
Type Suggestion Repros 1
Opened 9/23/2010 2:09:12 AM
Access Restriction Public


XML Documentation supports native C++ without templates. So in fact it does not support modern C++ code.

The problem is even larger as not only documentation on templates is not supported but having it leads to undefined behavior so even people satisfied with structured documentation in the code and no need for its advanced uses cannot use it with templates. (Another issue would be lack of template-specific tags.)

I hoped this will change in Visual Studio 2010 but as it appears it did not. Is this going to be changed? If so then when?

If not  then just removing the "undefined behavior" and adding tags for templates support (so that documentation can be written now but used later when support will be ready or by external tools) would be an improvement too.

See also forum thread:
Sign in to post a comment.
Posted by BenLemmond on 2/4/2016 at 10:17 AM
This issue is closed as "Fixed". However, it does not appear to be fixed at all.

In Visual Studio 2013, when I add xml doc comments to a template method and compile with the /doc switch, I get:

warning C4634: XML document comment: cannot be applied: Discarding XML document comment for invalid target.

These 2 pages confirm my issue:

Is there a workaround such that I can add xml doc comments to a template method, maintaining a consistent commenting format throughout my code base, without breaking my build?
Posted by Microsoft on 3/21/2011 at 9:59 AM

We also have plans to improve XML doc comments on native code, specifically on template code. However, there are lots of features related to XML Doc comments missing from IntelliSense currently that we need to focus our efforts first. We'll consider improving XML Doc comments in a future release.

Ulzii Luvsanbat
Windows C++ Team
Posted by Microsoft on 2/28/2011 at 8:49 AM

Thank you for your feedback. XML Doc comments is supported for native C++, you can pass /doc to non-managed C++ code and expect XML comments to be generated.

Ulzii Luvsanbat
Windows C++ Team
Posted by Microsoft on 9/23/2010 at 2:11 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(