//===-- rosa/support/type_pair.hpp ------------------------------*- C++ -*-===//
//
//                                 The RoSA Framework
//
// Distributed under the terms and conditions of the Boost Software License 1.0.
// See accompanying file LICENSE.
//
// If you did not receive a copy of the license file, see
// http://www.boost.org/LICENSE_1_0.txt.
//
//===----------------------------------------------------------------------===//
///
/// \file rosa/support/type_pair.hpp
///
/// \author David Juhasz (david.juhasz@tuwien.ac.at)
///
/// \date 2017
///
/// \brief Facilities for types representing pairs of types.
///
/// \note This implementation is based on the \c type_pair implementation of
/// CAF.
///
//===----------------------------------------------------------------------===//

#ifndef ROSA_SUPPORT_TYPE_PAIR_HPP
#define ROSA_SUPPORT_TYPE_PAIR_HPP

namespace rosa {

/// A pair of types.
///
/// \tparam F the first type
/// \tparam S the second type
template <typename F, typename S> struct TypePair {
  using First = F;  ///< The first type.
  using Second = S; ///< The second type.
};

/// Turns two types into a \c rosa::TypePair.
///
/// Turning two types \c F and \c S into \c rosa::TypePair<F, S> is as simple as
/// \code
/// typename ToTypePair<F, S>::Type
/// \endcode
///
/// \tparam F the fist type
/// \tparam S the second type
template <typename F, typename S> struct ToTypePair {
  using Type = TypePair<F, S>; ///< The \c rosa::TypePair.
};

} // End namespace rosa

#endif // ROSA_SUPPORT_TYPE_PAIR_HPP
