#ifndef SPROUT_UTILITY_PAIR_PAIR_HPP #define SPROUT_UTILITY_PAIR_PAIR_HPP #include #include #include #include #include #include #include #include #include namespace sprout { // // pair // template template inline SPROUT_CONSTEXPR sprout::pair::pair( sprout::tuples::tuple first_args, sprout::tuples::tuple second_args, sprout::index_tuple, sprout::index_tuple ) : first(sprout::tuples::get(first_args)...) , second(sprout::tuples::get(second_args)...) {} #if SPROUT_USE_DELEGATING_CONSTRUCTORS template template< typename... Args1, typename... Args2, typename > inline SPROUT_CONSTEXPR sprout::pair::pair( std::piecewise_construct_t, sprout::tuples::tuple first_args, sprout::tuples::tuple second_args ) : pair( first_args, second_args, sprout::make_index_tuple::make(), sprout::make_index_tuple::make() ) {} #endif // #if SPROUT_USE_DELEGATING_CONSTRUCTORS template template< typename U, typename V, typename > inline SPROUT_CONSTEXPR sprout::pair::pair(sprout::tuples::tuple const& other) : first(sprout::tuples::get<0>(other)) , second(sprout::tuples::get<1>(other)) {} template template< typename U, typename V, typename > inline SPROUT_CONSTEXPR sprout::pair::pair(sprout::tuples::tuple&& other) : first(sprout::forward(sprout::tuples::get<0>(other))) , second(sprout::forward(sprout::tuples::get<1>(other))) {} template template< typename U, typename V, typename > inline sprout::pair& sprout::pair::operator=(sprout::tuples::tuple const& rhs) { first = sprout::tuples::get<0>(rhs); second = sprout::tuples::get<0>(rhs); return *this; } template template< typename U, typename V, typename > inline sprout::pair& sprout::pair::operator=(sprout::tuples::tuple&& rhs) { first = sprout::forward(sprout::tuples::get<0>(rhs)); second = sprout::forward(sprout::tuples::get<1>(rhs)); return *this; } } // namespace sprout #endif // #ifndef SPROUT_UTILITY_PAIR_PAIR_HPP