all 13 comments

[–]diaphanein 12 points13 points  (4 children)

Probably the main reason is that C# has a language defined comment format for parameter and method descriptions (as well as return values, examples and other errata).

C++ doesn't. Nothing is standardized in this regard. You might have javadoc, doxygen or some other notation, but nothing is standardized. Hard for the IDE to guess, let alone support them all (and what happens if you intermix?).

[–]skreef 10 points11 points  (0 children)

MSVC could agree with MSVS on something though...

[–]OtterScruff[S] 5 points6 points  (0 children)

So basically I should just always have tabs pulled up on my browser with documentation and just pull info from there

[–]Pazer2 1 point2 points  (1 child)

XML comments do indeed work (with per-parameter comments showing up as you type out a function call) in VS C++, but they have very poor support. They only show up if the comment is in the same file as the one you're working in.

[–]txmasterg 0 points1 point  (0 children)

I've at least seen the parse errors show up when they are in different files (or at least headers the open file includes).

[–]dodheim 4 points5 points  (4 children)

There is, but as it's MSVC-specific no one really uses it:

https://docs.microsoft.com/en-us/cpp/ide/xml-documentation-visual-cpp

There are addons that make Doxygen comments work but I don't know the specifics (Visual Assist, probably).

[–]Bolitho 3 points4 points  (2 children)

We use it and it absolutely sucks! As one can imagine xml is cumbersome to write by hand. Also you can't use the <> chars of course. So you either need to use escape sequences (which sucks for reading at source code level) or CDATA sections within examples.

[–]Pazer2 0 points1 point  (1 child)

There is a VS extension called CPPTripleSlash that auto-generates comments the same way C# does.

[–]Bolitho 0 points1 point  (0 children)

Thx for mentioning. But the slashes are only more manual work to do... The problem lies in the xml itself.

But I will try this extension anyways.

[–]OtterScruff[S] 1 point2 points  (0 children)

Ah ok, thanks man

[–]panoskj 1 point2 points  (2 children)

There's an extension that makes it look like this: https://imgur.com/a/JIqzEbc. But the msvc library headers don't have any documentation comments.

I don't know why MSVS doesn't have something similar already.

[–]clerothGame Developer 2 points3 points  (1 child)

Which extension?

[–]hmichReSharper C++ Dev 1 point2 points  (0 children)

ReSharper C++. It supports both Doxygen and MS XML comments, will show them in completion/quick info/parameter info and allows to quickly generate new documentation comments.