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
};

...