// file : cult/containers/pair.hxx // author : Boris Kolpackov // copyright : Copyright (c) 2005-2010 Boris Kolpackov // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef CULT_CONTAINERS_PAIR_HXX #define CULT_CONTAINERS_PAIR_HXX #include namespace Cult { namespace Containers { template class Pair: public std::pair { typedef std::pair Base; Base& base () { return *this; } public: typedef T1 First; typedef T2 Second; public: Pair () : Base () { } Pair (First const& first, Second const& second) : Base (first, second) { } template Pair (std::pair const& pair) : Base (pair) { } template Pair& operator= (std::pair const& pair) { base () = pair; return *this; } }; } } #endif // CULT_CONTAINERS_PAIR_HXX