Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's the // @include in c++ comments

Tags:

c++

c++11

I saw code like below

// @include
template <typename T>
      .....
// @exclude

Actually, I saw it from here.

does the @include/@exclude have special meanings in the comment lines or is it only the author personal style?

like image 533
ahala Avatar asked Mar 20 '13 18:03

ahala


People also ask

What are the comments in C?

There are two ways to add comments in C: // - Single Line Comment. /*... */ - Multi-line Comment.

Can we Nest comments in C code?

In C, multi-line comments, /* and */, do not nest. Some guides go so far as to recommend that code sections must never be commented and that if code is to be temporarily disabled one could resort to using an #if 0 directive.

How many types of comment are there in C?

In C/C++ there are two types of comments : Single line comment. Multi-line comment.

What are header comments in C?

When a reader first picks up a listing, or edits a source file, the first thing that he sees is the file header comment at the start of the file. This should help him start to understand what the file is for, what is in it, what it does, why it does it, etc.


1 Answers

This has no special meaning in standard C++ and is probably part of some (documentation) tool that parses source files directly.

In particular, this is code from a book. The author may have chosen this syntax as a way to describe (and possibly automatically extract) what is in the book and what's not.

like image 169
orlp Avatar answered Nov 27 '22 13:11

orlp