Max OS 0.3
Loading...
Searching...
No Matches
pair.h
Go to the documentation of this file.
1
9#ifndef MAXOS_PAIR_H
10#define MAXOS_PAIR_H
11
12
13namespace MaxOS::common {
14
22 template<class First, class Second> class Pair {
23
24 public:
25 First first;
26 Second second;
27
29 Pair(First, Second);
30 ~Pair();
31 };
32
34 template<class First, class Second> Pair<First, Second>::Pair() = default;
35
44 template<class First, class Second> Pair<First, Second>::Pair(First first, Second second)
45 : first(first),
46 second(second) {
47
48 }
49
50 template<class First, class Second> Pair<First, Second>::~Pair()
51 = default;
52}
53
54
55#endif //MAXOS_PAIR_H
A pair of two objects.
Definition pair.h:22
First first
The first object (often the key)
Definition pair.h:25
Pair(First, Second)
Creates a new pair.
Definition pair.h:44
Pair()
_____________________________Implementation___________________________________________///
Second second
The second object (often the value)
Definition pair.h:26