#ifndef _PAIR #define _PAIR template class Pair { T left; U right; public: Pair(const T& left, const U& right); T& Left(); const T& Left() const; U& Right(); const U& Right() const; }; template Pair::Pair(const T& left, const U& right) : left(left), right(right) { } template T& Pair::Left() { return left; } template const T& Pair::Left() const { return left; } template U& Pair::Right() { return right; } template const U& Pair::Right() const { return right; } #endif /* _PAIR */