#ifndef SPROUT_TUPLE_TRAITS_HPP #define SPROUT_TUPLE_TRAITS_HPP #include #include namespace sprout { namespace tuples { // // tuple_traits // template struct tuple_traits { public: typedef Tuple internal_type; typedef Tuple clone_type; }; template struct tuple_traits : public sprout::tuples::tuple_traits {}; // // rebind_types // template struct rebind_types { public: template struct apply; }; template struct rebind_types > { public: template struct apply { public: typedef sprout::tuples::tuple type; }; }; // // clone_functor // template struct clone_functor { public: template SPROUT_CONSTEXPR typename sprout::tuples::tuple_traits::clone_type operator()(Other&& t) const { return typename sprout::tuples::tuple_traits::clone_type(sprout::forward(t)); } }; template struct clone_functor : public sprout::tuples::clone_functor {}; // // make_clone_functor // template struct make_clone_functor { public: template SPROUT_CONSTEXPR typename sprout::tuples::tuple_traits::clone_type operator()(Args&&... args) const { return typename sprout::tuples::tuple_traits::clone_type(sprout::forward(args)...); } }; template struct make_clone_functor : public sprout::tuples::make_clone_functor {}; // // remake_clone_functor // template struct remake_clone_functor { public: template SPROUT_CONSTEXPR typename sprout::tuples::tuple_traits::clone_type operator()( Other&& other, Args&&... args ) const { return sprout::tuples::make_clone_functor().template operator()(sprout::forward(args)...); } }; template struct remake_clone_functor : public sprout::tuples::remake_clone_functor {}; } // namespace tuples using sprout::tuples::tuple_traits; using sprout::tuples::rebind_types; } // namespace sprout #endif // #ifndef SPROUT_TUPLE_TRAITS_HPP