Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ comment style: /*M ... M*/, what 'M' stands for?

Tags:

c++

I have seen some 3rd party source code with comments in /*M ... M*/ style. But what 'M' stands for? (Perhaps it is used with some kind of version control, or code documentation system (like doxygen)?)

I saw it in many (if not all) source code files in opencv.

You may browse Itseez's opencv repository under GitHub by clicking here.

Oh. I forget to mention, the comment style seems to exist only in the head of the file, and it seems to declare the license.

Example:

/*M///////////////////////////////////////////////////////////////////////////////////////
//
//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
//  By downloading, copying, installing or using the software you agree to this license.
//  If you do not agree to this license, do not download, install,
//  copy or use the software.
//
//
//                           License Agreement
//                For Open Source Computer Vision Library

[...]
//
//M*/
like image 797
Robin Hsu Avatar asked Aug 03 '15 07:08

Robin Hsu


People also ask

What is comment line in C?

Single-line comments start with two forward slashes ( // ). Any text between // and the end of the line is ignored by the compiler (will not be executed).

What is a comment in C++?

In computer programming, a comment is a programmer-readable explanation or annotation in the source code of a computer program. Comments are statements that are not executed by the compiler and interpreter.

What are the two types of comments in C++?

There are two types of comments: single and multi-line. C-style comments or multi-line comments are used to comment on large blocks of text or code. C++ style comments or single-line comments are used to comment on single lines of text or code.


1 Answers

Note: Doesn't correlate to version control and even C++

This is a problem of cross-OS EOL-problem (Win|*Nix) and visualization of not-native EOL ^M (really such string) in CRLF in pure-CR world and Linux|Mac GUIs

Example for opengl.hpp (from your sample repo): first lines

/*M///////////////////////////////////////////////////////////////////////////////////////
//

are, with proper rendering

/*
///////////////////////////////////////////////////////////////////////////////////////
//

and all glithes are results of ugly configured core.CRLF in author's Git (or ignoring it at all)

like image 142
Lazy Badger Avatar answered Oct 28 '22 23:10

Lazy Badger