modm API documentation
|
Pair<FirstType, SecondType> is a heterogeneous pair. More...
#include <modm/container/pair.hpp>
Public Typedefs | |
using | FirstType = T1 |
using | SecondType = T2 |
Public Member Functions | |
FirstType & | getFirst () |
const FirstType & | getFirst () const |
SecondType & | getSecond () |
const SecondType & | getSecond () const |
Pair<FirstType, SecondType> is a heterogeneous pair.
This class holds one object of type FirstType and one object of type SecondType.
It provides only the default constructors and public variables to enable usage as POD (plain old data) object. Only with this characteristic it is possible to storage objects of this type inside the flash-memory which is desirable for example for the interpolation classes.
This constraint make a the usage rather unusual. See this example:
As this class has no constructor you need to use the following syntax to initialize an instance of this class: