12345678910111213141516171819202122232425262728293031323334 |
- #pragma once
- namespace Framework
- {
- template<typename First, typename Second> class ImmutablePair
- {
- private:
- First first;
- Second second;
- public:
- ImmutablePair() {}
- ImmutablePair(const First& first, const Second& second)
- : first(first),
- second(second)
- {}
- ImmutablePair(const ImmutablePair<First, Second>& other)
- : first(other.first),
- second(other.second)
- {}
- const First& getFirst() const
- {
- return first;
- }
- const Second& getSecond() const
- {
- return second;
- }
- };
- } // namespace Framework
|