30 lines
425 B
C++
30 lines
425 B
C++
#ifndef EXERCISE_1_HPP_
|
|
#define EXERCISE_1_HPP_
|
|
|
|
template <typename T>
|
|
class Pair1
|
|
{
|
|
private:
|
|
T m_first;
|
|
T m_second;
|
|
public:
|
|
Pair1(const T& first, const T& second) : m_first(first), m_second(second) { }
|
|
|
|
const T& first() const;
|
|
const T& second() const;
|
|
};
|
|
|
|
template <typename T>
|
|
const T& Pair1<T>::first() const
|
|
{
|
|
return m_first;
|
|
}
|
|
|
|
template <typename T>
|
|
const T& Pair1<T>::second() const
|
|
{
|
|
return m_second;
|
|
}
|
|
|
|
#endif
|