Nested comments in Visual C ++?

Is it possible to include nested comments (/ * / * * / * /) in Visual C ++?

I can not find the switch if it is.

+3
source share
3 answers

Nested comments are not allowed in the C ++ standard. Visual C ++ supports this standard.

Sorry, no nested comments.

+7
source

I do not think it is possible using this style of quotation. The first "* /" always "closes" the quote.

+6
source

I donโ€™t think itโ€™s possible, but if you want to โ€œcommentโ€ on a piece of code that itself contains comments, you can always use a preprocessor,

#ifdef NOT_REQUIRED /** * foo */ void foo() { } #endif 
+4
source

Source: https://habr.com/ru/post/893387/


All Articles