Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space RWDEVEL and version 2024.1

...

Table of Content Zone
maxLevel3
minLevel3
locationtop

Explicit Template Instance

Explicit template instances for types, functions and variables. For example:

Code Block
template <typename T> void func(){}
template void func<int>(); // Explicit Template Instance
template <typename T> class C { T m1; };
template class C <int>; // Explicit Template Instance

Friend

Friend function declaration. For example:

Code Block
void friendFunc();
class Foo {
public:
    friend void friendFunc();     // Friend
};

Functions

Function declarations. This includes Global and Member functions..

Global Function

Global function declaration. For example:

Code Block
void globalFunc1();  
   // Global Function, IsDecl is true
   // IsImplementation is false
   // HasVoid is true	
void globalFunc2() { }     
   // Global Function, IsDecl is true
   // IsImplementation is true
   // HasEllipsis is true

Member Function

Member function declaration. For example:

Code Block
class Foo {
public:
	Foo () {};	  // Member Function, IsDefaultConstructor is true
	void func();  // Member Function	
};

Parameter

Parameters include parameter and this.

Parameter

Function parameter declaration. For example:

void func(int i); // i is parameter whose type is int

This

Parameter usage. For example:

Code Block
class T{
T* func(T t){return this; } //this parameter
}

Anchor
static_assert
static_assert
static_assert 

Static assertion declaration. For example:

Code Block
static_assert(sizeof(int) == 8, "Incorrect size of int type");
    // Condition property points to: sizeof(int) == 8
    // Message property points to: "Incorrect size of int type"

Variables

Variables include global, local, and member variables.

Global Variable

Global Variable. For example:

Code Block
int global;    // Global Variable, IsDecl is true
global = 3;    // Global Variable, IsDecl is false

Local Variable

Local Variable. For example:

Code Block
void func() {
   int local;   // Local Variable, IsDecl is true
   local = 3;   // Local Variable, IsDecl is false
}

Member Variable

Member Variable. For example:

Code Block
class Foo {
public:
  Foo() : member(0) { }  // Member Variable, IsDecl is false
private:
  int member;            // Member Variable, IsDecl is true
};

...

Table of Content Zone
maxLevel3
minLevel3
locationtop

Block

Block statement. Normally contains other statements. Begins and ends with curly braces. For example:

Code Block
void func() {       // block
}

Case Lable

Represents a case or default label in a switch statement. For example:

Code Block
void func(int i) {
    switch(i) {
    case 1:             // Case Label
        break;          
    case 3:             // Case Label
    default:            // Case Label
        break;
    }
  }

Simple

A statement that does not fall into any other statement category. The simple statement's body usually contains an expression. For example:

Code Block
void func(int & i) {
    i++;            // Simple statement
}

Empty

An empty ; statement. For example:

Code Block
void func() {
    if(true);             // Empty statement
}

break

Break statement. For example:

Code Block
bool bar();
void func() {
   while(1) {
      if (bar()) {
          break;    // break
      }
   }
}

case

Case statement. For example:

Code Block
void func(int i) {
    switch(i) {
    case 1: { break; }  // case
    case 2: { break; }  // case
    }
}

catch

Catch statement used for exception handling. For example:

Code Block
void bar();
void func(int i) {
    try {
       bar();
    } catch (...) {     // catch
    }
}

continue

Continue statement used in loops. For example:

Code Block
bool bar(int);
void func(int i) {
    while(i--) {
       if (bar(i)) {
          continue;     // continue
       }
    }
}

default

Default statement used inside a switch statement. For example:

Code Block
void func(int i) {
    switch(i) {
    case 1: { break; }
    case 2: { break; }
    default: { break; }            // default
    }
}

do

whjile

while

Do while loop statement. For example:

Code Block
void func(int i) {
    do {                            // do while
        i--;
    } while (i);
}

for

For loop statement. For example:

Code Block
void bar();
void func() {
   for (int i = 0; i < 10; i++) {  // for
      bar();
   }
}

for range

Range-based for loop statement. For example:

Code Block
void bar();
void func() {
   for (auto iterator : range_expr) {  // for
      bar();
   }
}

goto

Goto statement. For example:

Code Block
void func(bool done) {
   if (done) {
      goto end;             // goto
   }
   end:
}

if

If statement. For example:

Code Block
void func(bool done) {
   if (done) {             // if
       return; 
   }
}

return

Return statement. For example:

Code Block
int func() {
   return 0;               // return
}

switch

Switch statement. For example:

Code Block
void func(int i) {
    switch(i) {             // switch
    case 1: { break; }
    case 2: { break; }
    default: { break; }
    }
}

try

Try statement. For example:

Code Block
void bar();
void func(int i) {
    try {                  // try
        bar();
    } catch (...) {
    }
}

while

While statement. For example:

Code Block
void func(int i) {
   while (i--) {  // while
   }
}

...