From 588a6eeb1bfca4f8dc173f79b0cf276b76aa920b Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Thu, 30 Aug 2001 14:44:24 +0000 Subject: [PATCH] Added default constructor for cons<>. [SVN r10967] --- include/boost/tuple/detail/tuple_basic.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/boost/tuple/detail/tuple_basic.hpp b/include/boost/tuple/detail/tuple_basic.hpp index 779e4dd..7232676 100644 --- a/include/boost/tuple/detail/tuple_basic.hpp +++ b/include/boost/tuple/detail/tuple_basic.hpp @@ -22,6 +22,9 @@ // William Kempf, Vesa Karvonen, John Max Skaller, Ed Brey, Beman Davis, // David Abrahams. +// Revision history: +// 2001 08 30 David Abrahams +// Added default constructor for cons<>. // ----------------------------------------------------------------- #ifndef BOOST_TUPLE_BASIC_HPP @@ -226,6 +229,10 @@ struct cons { typename tuple_access_traits::const_type get_tail() const { return tail; } + cons() + : head(detail::tuples::default_arg::f()), tail() + {} + cons(typename tuple_access_traits::parameter_type h, const tail_type& t) : head (h), tail(t) {} @@ -293,7 +300,11 @@ struct cons { get_head() const { return head; } const null_type get_tail() const { return null_type(); } - + + cons() + : head(detail::tuples::default_arg::f()) + {} + cons(typename tuple_access_traits::parameter_type h, const null_type& = null_type()) : head (h) {}