namespace std {

//------------------------------------------------------------------------------
template<typename Encoder, class T1, class T2>
  inline void encode(Encoder& e, const std::pair<T1, T2>& pair) {
    e.template put(pair.first);
    e.template put(pair.second);
  }

//------------------------------------------------------------------------------
template<class T1, class T2>
inline void decode(binary::decoder& d, std::pair<T1, T2>& pair) {
  if (d.error()) return;
  pair.first  = d.get<T1>();

  if (d.error()) return;
  pair.second = d.get<T2>();
}

//------------------------------------------------------------------------------

} // std namespace

#endif // ifndef BINARY_SERIALIZE_PAIR_H
