diff --git a/include/boost/tuple/detail/tuple_basic.hpp b/include/boost/tuple/detail/tuple_basic.hpp index 499ec8f..56f92ce 100644 --- a/include/boost/tuple/detail/tuple_basic.hpp +++ b/include/boost/tuple/detail/tuple_basic.hpp @@ -338,12 +338,6 @@ struct map_tuple_to_cons > type; }; -template -struct map_tuple_to_cons -{ - typedef cons type; -}; - // The empty tuple is a null_type template <> struct map_tuple_to_cons @@ -413,6 +407,16 @@ public: }; +// The empty tuple +template <> +class tuple : + public null_type +{ +public: + typedef null_type inherited; +}; + + // Swallows any assignment (by Doug Gregor) namespace detail { namespace tuples { @@ -544,37 +548,37 @@ struct make_tuple_mapper { } // end detail // -make_tuple function templates ----------------------------------- -//tuple<> inline make_tuple() { -// return tuple<>(); -//} +tuple<> inline make_tuple() { + return tuple<>(); +} template -boost::detail::tuples::make_tuple_mapper::type +typename boost::detail::tuples::make_tuple_mapper::type inline make_tuple(const T0& t0) { return boost::detail::tuples::make_tuple_mapper::type(t0); } template -boost::detail::tuples::make_tuple_mapper::type +typename boost::detail::tuples::make_tuple_mapper::type inline make_tuple(const T0& t0, const T1& t1) { return boost::detail::tuples::make_tuple_mapper::type(t0, t1); } template -boost::detail::tuples::make_tuple_mapper::type +typename boost::detail::tuples::make_tuple_mapper::type inline make_tuple(const T0& t0, const T1& t1, const T2& t2) { return boost::detail::tuples::make_tuple_mapper::type(t0, t1, t2); } template -boost::detail::tuples::make_tuple_mapper::type +typename boost::detail::tuples::make_tuple_mapper::type inline make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3) { return boost::detail::tuples::make_tuple_mapper::type (t0, t1, t2, t3); } template -boost::detail::tuples::make_tuple_mapper::type +typename boost::detail::tuples::make_tuple_mapper::type inline make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4) { return boost::detail::tuples::make_tuple_mapper::type @@ -582,7 +586,7 @@ inline make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, } template -boost::detail::tuples::make_tuple_mapper::type +typename boost::detail::tuples::make_tuple_mapper::type inline make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) { return boost::detail::tuples::make_tuple_mapper::type @@ -590,7 +594,7 @@ inline make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, } template -boost::detail::tuples::make_tuple_mapper::type +typename boost::detail::tuples::make_tuple_mapper::type inline make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6) { return boost::detail::tuples::make_tuple_mapper @@ -600,7 +604,7 @@ inline make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, template -boost::detail::tuples::make_tuple_mapper::type +typename boost::detail::tuples::make_tuple_mapper::type inline make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7) { return boost::detail::tuples::make_tuple_mapper @@ -610,7 +614,7 @@ inline make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, template -boost::detail::tuples::make_tuple_mapper +typename boost::detail::tuples::make_tuple_mapper ::type inline make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, @@ -622,7 +626,7 @@ inline make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, template -boost::detail::tuples::make_tuple_mapper +typename boost::detail::tuples::make_tuple_mapper ::type inline make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7,