Index: tuple_basic_no_partial_spec.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/tuple/detail/tuple_basic_no_partial_spec.hpp,v retrieving revision 1.11 diff -w -u -c -r1.11 tuple_basic_no_partial_spec.hpp cvs server: conflicting specifications of output style *** tuple_basic_no_partial_spec.hpp 24 Jun 2002 14:20:29 -0000 1.11 --- tuple_basic_no_partial_spec.hpp 27 Sep 2002 00:23:21 -0000 *************** *** 98,103 **** --- 98,104 ---- } }; + template struct add_const_reference : add_reference::type> {}; } // end of namespace detail // cons builds a heterogenous list of types *************** *** 108,143 **** typedef Head head_type; typedef Tail tail_type; head_type head; tail_type tail; ! typename boost::add_reference::type get_head() { return head; } ! typename boost::add_reference::type get_tail() { return tail; } ! typename boost::add_reference::type get_head() const { return head; } ! typename boost::add_reference::type get_tail() const { return tail; } #if defined BOOST_MSVC template ! explicit cons(const head_type& h /* = head_type() */, // causes MSVC 6.5 to barf. const Tail& t) : head(h), tail(t.head, t.tail) { } ! explicit cons(const head_type& h /* = head_type() */, // causes MSVC 6.5 to barf. const null_type& t) : head(h), tail(t) { } #else template ! explicit cons(const head_type& h, const T& t) : head(h), tail(t.head, t.tail) { } ! explicit cons(const head_type& h = head_type(), ! const tail_type& t = tail_type()) : head(h), tail(t) { } --- 109,150 ---- typedef Head head_type; typedef Tail tail_type; + private: + typedef typename boost::add_reference::type head_ref; + typedef typename boost::add_reference::type tail_ref; + typedef typename detail::add_const_reference::type head_cref; + typedef typename detail::add_const_reference::type tail_cref; + public: head_type head; tail_type tail; ! head_ref get_head() { return head; } ! tail_ref get_tail() { return tail; } ! head_cref get_head() const { return head; } ! tail_cref get_tail() const { return tail; } #if defined BOOST_MSVC template ! explicit cons(head_cref h /* = head_type() */, // causes MSVC 6.5 to barf. const Tail& t) : head(h), tail(t.head, t.tail) { } ! explicit cons(head_cref h /* = head_type() */, // causes MSVC 6.5 to barf. const null_type& t) : head(h), tail(t) { } #else template ! explicit cons(head_cref h, const T& t) : head(h), tail(t.head, t.tail) { } ! explicit cons(head_cref h = head_type(), ! tail_cref t = tail_type()) : head(h), tail(t) { } *************** *** 416,435 **** typedef typename mapped_tuple::cons2 cons2; typedef typename mapped_tuple::cons1 cons1; public: typedef cons1 inherited; typedef tuple self_type; ! explicit tuple(const T1& t1 = T1(), ! const T2& t2 = T2(), ! const T3& t3 = T3(), ! const T4& t4 = T4(), ! const T5& t5 = T5(), ! const T6& t6 = T6(), ! const T7& t7 = T7(), ! const T8& t8 = T8(), ! const T9& t9 = T9(), ! const T10& t10 = T10()) : cons1(t1, cons2(t2, cons3(t3, cons4(t4, cons5(t5, cons6(t6,cons7(t7,cons8(t8,cons9(t9,cons10(t10)))))))))) { } --- 423,453 ---- typedef typename mapped_tuple::cons2 cons2; typedef typename mapped_tuple::cons1 cons1; + typedef typename detail::add_const_reference::type t1_cref; + typedef typename detail::add_const_reference::type t2_cref; + typedef typename detail::add_const_reference::type t3_cref; + typedef typename detail::add_const_reference::type t4_cref; + typedef typename detail::add_const_reference::type t5_cref; + typedef typename detail::add_const_reference::type t6_cref; + typedef typename detail::add_const_reference::type t7_cref; + typedef typename detail::add_const_reference::type t8_cref; + typedef typename detail::add_const_reference::type t9_cref; + typedef typename detail::add_const_reference::type t10_cref; public: typedef cons1 inherited; typedef tuple self_type; ! explicit tuple(t1_cref t1 = T1(), ! t2_cref t2 = T2(), ! t3_cref t3 = T3(), ! t4_cref t4 = T4(), ! t5_cref t5 = T5(), ! t6_cref t6 = T6(), ! t7_cref t7 = T7(), ! t8_cref t8 = T8(), ! t9_cref t9 = T9(), ! t10_cref t10 = T10() ! ) : cons1(t1, cons2(t2, cons3(t3, cons4(t4, cons5(t5, cons6(t6,cons7(t7,cons8(t8,cons9(t9,cons10(t10)))))))))) { }