A Discrete-Event Network Simulator
API
ns3::IntToType< v > Struct Template Reference

Convert an integer into a type. More...

#include "int-to-type.h"

Public Types

enum  v_e { value = v }
 Enumeration holding the type-specific value. More...
 

Detailed Description

template<int v>
struct ns3::IntToType< v >

Convert an integer into a type.

This trivial template is extremely useful, as explained in "Modern C++ Design", p 29, section 2.4, "Mapping Integral Constants to Types".

For an example, see timer-impl.h

Template Parameters
v[explicit] The integral constant value distinguishing this type from other values.

Definition at line 43 of file int-to-type.h.

Member Enumeration Documentation

◆ v_e

template<int v>
enum ns3::IntToType::v_e

Enumeration holding the type-specific value.

Enumerator
value 

The integer value distinguishing this type.

Definition at line 46 of file int-to-type.h.


The documentation for this struct was generated from the following file: