]> git.lyx.org Git - lyx.git/blob - boost/boost/tuple/detail/tuple_basic_no_partial_spec.hpp
update from boost cvs
[lyx.git] / boost / boost / tuple / detail / tuple_basic_no_partial_spec.hpp
1 // - tuple_basic_no_partial_spec.hpp -----------------------------------------
2
3 // Copyright (C) 1999, 2000 Jaakko Järvi (jaakko.jarvi@cs.utu.fi)
4 // Copyright (C) 2001 Doug Gregor (gregod@rpi.edu)
5 // Copyright (C) 2001 Gary Powell (gary.powell@sierra.com)
6 //
7 // Permission to copy, use, sell and distribute this software is granted
8 // provided this copyright notice appears in all copies. 
9 // Permission to modify the code and to distribute modified code is granted
10 // provided this copyright notice appears in all copies, and a notice 
11 // that the code was modified is included with the copyright notice.
12 //
13 // This software is provided "as is" without express or implied warranty, 
14 // and with no claim as to its suitability for any purpose.
15
16 // For more information, see http://www.boost.org or http://lambda.cs.utu.fi 
17
18 // Revision History 
19 //  14 02 01    Remove extra ';'. Also, fixed 10-parameter to make_tuple. (DG)
20 //  10 02 01    Fixed "null_type" constructors.
21 //              Implemented comparison operators globally.
22 //              Hide element_type_ref and element_type_const_ref.
23 //              (DG).
24 //  09 02 01    Extended to tuples of length 10. Changed comparison for 
25 //              operator<()
26 //              to the same used by std::pair<>, added cnull_type() (GP)
27 //  03 02 01    Initial Version from original tuple.hpp code by JJ. (DG)
28
29 // ----------------------------------------------------------------- 
30
31 #ifndef BOOST_TUPLE_BASIC_NO_PARTIAL_SPEC_HPP
32 #define BOOST_TUPLE_BASIC_NO_PARTIAL_SPEC_HPP
33
34 #include "boost/type_traits.hpp"
35
36 #if defined BOOST_MSVC
37 #pragma warning(disable:4518) // storage-class or type specifier(s) unexpected here; ignored
38 #pragma warning(disable:4181) // qualifier applied to reference type ignored
39 #pragma warning(disable:4227) // qualifier applied to reference type ignored
40 #endif
41
42 namespace boost {
43
44     // null_type denotes the end of a list built with "cons"
45     struct null_type 
46     {
47       null_type() {}
48       null_type(const null_type&, const null_type&) {}
49     };
50      
51     // a helper function to provide a const null_type type temporary
52     inline const null_type cnull_type() { return null_type(); }
53
54     namespace detail {
55     namespace tuples {
56       // Takes a pointer and routes all assignments to whatever it points to
57       template<typename T>
58       struct assign_to_pointee
59       {
60       public:
61         explicit assign_to_pointee(T* p) : ptr(p) {}
62
63         template<typename Other>
64         assign_to_pointee& operator=(const Other& other)
65         {
66           *ptr = other;
67           return *this;
68         }
69
70       private:
71         T* ptr;
72       };
73
74       // Swallows any assignment
75       struct swallow_assign
76       {
77         template<typename T>
78         swallow_assign& operator=(const T&)
79         {
80           return *this;
81         }
82       };
83
84   } // end of namespace tuples
85   } // end of namespace detail
86
87     // cons builds a heterogenous list of types
88    template<typename Head, typename Tail = null_type>
89     struct cons
90     {
91       typedef cons self_type;
92       typedef Head head_type;
93       typedef Tail tail_type;
94
95       head_type head;
96       tail_type tail;
97
98       typename boost::add_reference<head_type>::type get_head() { return head; }
99       typename boost::add_reference<tail_type>::type get_tail() { return tail; }  
100
101       typename boost::add_reference<const head_type>::type get_head() const { return head; }
102       typename boost::add_reference<const tail_type>::type get_tail() const { return tail; }
103   
104       template<typename Other>
105       explicit cons(const Other& other) : head(other.head), tail(other.tail)
106       {
107       }
108
109 #if defined BOOST_MSVC
110       explicit cons(const head_type& h /* = head_type() */, // causes MSVC 6.5 to barf.
111         const tail_type& t = tail_type()) :
112           head(h), tail(t)
113       {
114       }
115 #else
116       explicit cons(const head_type& h = head_type(),
117                     const tail_type& t = tail_type()) :
118         head(h), tail(t)
119       {
120       }
121 #endif
122
123
124       template<typename Other>
125       cons& operator=(const Other& other)
126       {
127         head = other.head;
128         tail = other.tail;
129         return *this;
130       }
131     };
132   
133     namespace detail {
134     namespace tuples {
135       // Determines if the parameter is null_type
136       template<typename T> struct is_null_type { enum { RET = 0 }; };
137       template<> struct is_null_type<null_type> { enum { RET = 1 }; };
138       
139       /* Build a cons structure from the given Head and Tail. If both are null_type,
140       return null_type. */
141       template<typename Head, typename Tail>
142       struct build_cons
143       {
144       private:
145         enum { tail_is_null_type = is_null_type<Tail>::RET };
146       public:
147         typedef cons<Head, Tail> RET;
148       };
149
150       template<>
151       struct build_cons<null_type, null_type>
152       {
153         typedef null_type RET;
154       };
155
156       // Map the N elements of a tuple into a cons list
157       template<
158         typename T1, 
159         typename T2 = null_type, 
160         typename T3 = null_type, 
161         typename T4 = null_type, 
162         typename T5 = null_type, 
163         typename T6 = null_type, 
164         typename T7 = null_type, 
165         typename T8 = null_type, 
166         typename T9 = null_type, 
167         typename T10 = null_type
168       >
169       struct map_tuple_to_cons
170       {
171         typedef typename detail::tuples::build_cons<T10, null_type  >::RET cons10;
172         typedef typename detail::tuples::build_cons<T9, cons10>::RET cons9;
173         typedef typename detail::tuples::build_cons<T8, cons9>::RET cons8;
174         typedef typename detail::tuples::build_cons<T7, cons8>::RET cons7;
175         typedef typename detail::tuples::build_cons<T6, cons7>::RET cons6;
176         typedef typename detail::tuples::build_cons<T5, cons6>::RET cons5;
177         typedef typename detail::tuples::build_cons<T4, cons5>::RET cons4;
178         typedef typename detail::tuples::build_cons<T3, cons4>::RET cons3;
179         typedef typename detail::tuples::build_cons<T2, cons3>::RET cons2;
180         typedef typename detail::tuples::build_cons<T1, cons2>::RET cons1;
181       };
182
183       // Workaround the lack of partial specialization in some compilers
184       template<int N>
185       struct _element_type
186       {
187         template<typename Tuple>
188         struct inner
189         {
190         private:
191           typedef typename Tuple::tail_type tail_type;
192           typedef _element_type<N-1> next_elt_type;
193
194         public:
195           typedef typename _element_type<N-1>::template inner<tail_type>::RET RET;
196         };
197       };
198
199       template<>
200       struct _element_type<0>
201       {
202         template<typename Tuple>
203         struct inner
204         {
205           typedef typename Tuple::head_type RET;
206         };
207       };
208     } // detail
209     } // tuples
210
211     // Return the Nth type of the given Tuple
212     template<int N, typename Tuple>
213     struct tuple_element
214     {
215     private:
216       typedef detail::tuples::_element_type<N> nth_type;
217
218     public:
219       typedef typename nth_type::template inner<Tuple>::RET RET;
220       typedef RET type;
221     };
222
223     namespace detail {
224     namespace tuples {
225       // Return a reference to the Nth type of the given Tuple
226       template<int N, typename Tuple>
227       struct tuple_element_ref
228       {
229       private:
230         typedef typename tuple_element<N, Tuple>::RET elt_type;
231
232       public:
233         typedef typename add_reference<elt_type>::type RET;
234         typedef RET type;
235       };
236
237       // Return a const reference to the Nth type of the given Tuple
238       template<int N, typename Tuple>
239       struct tuple_element_const_ref
240       {
241       private:
242         typedef typename tuple_element<N, Tuple>::RET elt_type;
243
244       public:
245         typedef typename add_reference<const elt_type>::type RET;
246         typedef RET type;
247       };
248     }
249     }
250     // Get length of this tuple
251     template<typename Tuple>
252     struct tuple_length
253     {
254       enum { value = 1 + tuple_length<typename Tuple::tail_type>::value };
255     };
256
257     template<>
258     struct tuple_length<null_type>
259     {
260       enum { value = 0 };
261     };
262
263     // Reference the Nth element in a tuple and retrieve it with "get"
264     template<int N>
265     struct element
266     {
267       template<typename Tuple>
268       static inline
269       typename detail::tuples::tuple_element_ref<N, Tuple>::RET
270       get(Tuple& t)
271       {
272         return element<N-1>::get(t.tail);
273       }
274
275       template<typename Tuple>
276       static inline
277       typename detail::tuples::tuple_element_const_ref<N, Tuple>::RET
278       get(const Tuple& t)
279       {
280         return element<N-1>::get(t.tail);
281       }
282     };
283
284     template<>
285     struct element<0>
286     {
287       template<typename Tuple>
288       static inline
289       typename add_reference<typename Tuple::head_type>::type
290       get(Tuple& t)
291       {
292         return t.head;
293       }
294
295       template<typename Tuple>
296       static inline
297       typename add_reference<const typename Tuple::head_type>::type
298       get(const Tuple& t)
299       {
300         return t.head;
301       }
302     };
303
304     // tuple class
305     template<
306       typename T1, 
307       typename T2 = null_type, 
308       typename T3 = null_type, 
309       typename T4 = null_type,
310       typename T5 = null_type,
311       typename T6 = null_type,
312       typename T7 = null_type,
313       typename T8 = null_type,
314       typename T9 = null_type,
315       typename T10 = null_type
316     >
317     class tuple : 
318       public detail::tuples::map_tuple_to_cons<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::cons1
319     {
320     private:
321       typedef detail::tuples::map_tuple_to_cons<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> mapped_tuple;
322       typedef typename mapped_tuple::cons10 cons10;
323       typedef typename mapped_tuple::cons9 cons9;
324       typedef typename mapped_tuple::cons8 cons8;
325       typedef typename mapped_tuple::cons7 cons7;
326       typedef typename mapped_tuple::cons6 cons6;
327       typedef typename mapped_tuple::cons5 cons5;
328       typedef typename mapped_tuple::cons4 cons4;
329       typedef typename mapped_tuple::cons3 cons3;
330       typedef typename mapped_tuple::cons2 cons2;
331       typedef typename mapped_tuple::cons1 cons1;
332
333     public:
334       typedef tuple self_type;
335
336       explicit tuple(const T1& t1 = T1(), 
337                      const T2& t2 = T2(),
338                      const T3& t3 = T3(),
339                      const T4& t4 = T4(),
340                      const T5& t5 = T5(),
341                      const T6& t6 = T6(),
342                      const T7& t7 = T7(),
343                      const T8& t8 = T8(),
344                      const T9& t9 = T9(),
345                      const T10& t10 = T10()) :
346         cons1(t1, cons2(t2, cons3(t3, cons4(t4, cons5(t5, cons6(t6,cons7(t7,cons8(t8,cons9(t9,cons10(t10))))))))))
347       {
348       }
349
350       template<typename Other>
351       explicit tuple(const Other& other) : cons1(other)
352       {
353       }
354
355       template<typename Other>
356       self_type& operator=(const Other& other)
357       {
358         this->head = other.head;
359         this->tail = other.tail;
360         return *this;
361       }
362     };
363
364     // Retrieve the Nth element in the typle
365     template<int N, typename Tuple>
366     typename detail::tuples::tuple_element_ref<N, Tuple>::RET
367     get(Tuple& t)
368     {
369       return element<N>::get(t);
370     }
371
372     // Retrieve the Nth element in the typle
373     template<int N, typename Tuple>
374     typename detail::tuples::tuple_element_const_ref<N, Tuple>::RET
375     get(const Tuple& t) 
376     {
377       return element<N>::get(t);
378     }
379      
380     // Make a tuple
381     template<typename T1>
382     inline
383     tuple<T1>
384     make_tuple(const T1& t1)
385     {
386       return tuple<T1>(t1);
387     }
388
389     // Make a tuple
390     template<typename T1, typename T2>
391     inline
392     tuple<T1, T2>
393     make_tuple(const T1& t1, const T2& t2)
394     {
395       return tuple<T1, T2>(t1, t2);
396     }
397
398     // Make a tuple
399     template<typename T1, typename T2, typename T3>
400     inline
401     tuple<T1, T2, T3>
402     make_tuple(const T1& t1, const T2& t2, const T3& t3)
403     {
404       return tuple<T1, T2, T3>(t1, t2, t3);
405     }
406
407     // Make a tuple
408     template<typename T1, typename T2, typename T3, typename T4>
409     inline
410     tuple<T1, T2, T3, T4>
411     make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4)
412     {
413       return tuple<T1, T2, T3, T4>(t1, t2, t3, t4);
414     }
415
416     // Make a tuple
417     template<typename T1, typename T2, typename T3, typename T4, typename T5>
418     inline
419     tuple<T1, T2, T3, T4, T5>
420     make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5)
421     {
422       return tuple<T1, T2, T3, T4, T5>(t1, t2, t3, t4, t5);
423     }
424
425     // Make a tuple
426     template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
427     inline
428     tuple<T1, T2, T3, T4, T5, T6>
429     make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6)
430     {
431       return tuple<T1, T2, T3, T4, T5, T6>(t1, t2, t3, t4, t5, t6);
432     }
433   
434     // Make a tuple
435     template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
436     inline
437     tuple<T1, T2, T3, T4, T5, T6, T7>
438     make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7)
439     {
440       return tuple<T1, T2, T3, T4, T5, T6, T7>(t1, t2, t3, t4, t5, t6, t7);
441     }
442
443     // Make a tuple
444     template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
445     inline
446     tuple<T1, T2, T3, T4, T5, T6, T7, T8>
447     make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8)
448     {
449       return tuple<T1, T2, T3, T4, T5, T6, T7, T8>(t1, t2, t3, t4, t5, t6, t7, t8);
450     }
451
452     // Make a tuple
453     template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
454     inline
455     tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>
456     make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9)
457     {
458       return tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>(t1, t2, t3, t4, t5, t6, t7, t8, t9);
459     }
460
461     // Make a tuple
462     template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
463     inline
464     tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
465     make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10)
466     {
467       return tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10);
468     }
469
470     // Tie variables into a tuple
471     template<typename T1>
472     inline
473     tuple<detail::tuples::assign_to_pointee<T1> >
474     tie(T1& t1)
475     {
476       return make_tuple(detail::tuples::assign_to_pointee<T1>(&t1));
477     }
478
479     // Tie variables into a tuple
480     template<typename T1, typename T2>
481     inline
482     tuple<detail::tuples::assign_to_pointee<T1>, 
483       detail::tuples::assign_to_pointee<T2> >
484     tie(T1& t1, T2& t2)
485     {
486       return make_tuple(detail::tuples::assign_to_pointee<T1>(&t1),
487                         detail::tuples::assign_to_pointee<T2>(&t2));
488     }
489
490     // Tie variables into a tuple
491     template<typename T1, typename T2, typename T3>
492     inline
493     tuple<detail::tuples::assign_to_pointee<T1>, 
494       detail::tuples::assign_to_pointee<T2>, 
495       detail::tuples::assign_to_pointee<T3> >
496     tie(T1& t1, T2& t2, T3& t3)
497     {
498       return make_tuple(detail::tuples::assign_to_pointee<T1>(&t1),
499                         detail::tuples::assign_to_pointee<T2>(&t2),
500                         detail::tuples::assign_to_pointee<T3>(&t3));
501     }
502
503     // Tie variables into a tuple
504     template<typename T1, typename T2, typename T3, typename T4>
505     inline
506     tuple<detail::tuples::assign_to_pointee<T1>, 
507       detail::tuples::assign_to_pointee<T2>, 
508       detail::tuples::assign_to_pointee<T3>, 
509       detail::tuples::assign_to_pointee<T4> >
510     tie(T1& t1, T2& t2, T3& t3, T4& t4)
511     {
512       return make_tuple(detail::tuples::assign_to_pointee<T1>(&t1),
513                         detail::tuples::assign_to_pointee<T2>(&t2),
514                         detail::tuples::assign_to_pointee<T3>(&t3),
515                         detail::tuples::assign_to_pointee<T4>(&t4));
516     }
517
518     // Tie variables into a tuple
519     template<typename T1, typename T2, typename T3, typename T4, typename T5>
520     inline
521     tuple<detail::tuples::assign_to_pointee<T1>, 
522       detail::tuples::assign_to_pointee<T2>, 
523       detail::tuples::assign_to_pointee<T3>, 
524       detail::tuples::assign_to_pointee<T4>, 
525       detail::tuples::assign_to_pointee<T5> >
526     tie(T1& t1, T2& t2, T3& t3, T4& t4, T5 &t5)
527     {
528       return make_tuple(detail::tuples::assign_to_pointee<T1>(&t1),
529                         detail::tuples::assign_to_pointee<T2>(&t2),
530                         detail::tuples::assign_to_pointee<T3>(&t3),
531                         detail::tuples::assign_to_pointee<T4>(&t4),
532                         detail::tuples::assign_to_pointee<T5>(&t5));
533     }
534
535     // Tie variables into a tuple
536     template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
537     inline
538     tuple<detail::tuples::assign_to_pointee<T1>, 
539       detail::tuples::assign_to_pointee<T2>, 
540       detail::tuples::assign_to_pointee<T3>, 
541       detail::tuples::assign_to_pointee<T4>, 
542       detail::tuples::assign_to_pointee<T5>, 
543       detail::tuples::assign_to_pointee<T6> >
544     tie(T1& t1, T2& t2, T3& t3, T4& t4, T5 &t5, T6 &t6)
545     {
546       return make_tuple(detail::tuples::assign_to_pointee<T1>(&t1),
547                         detail::tuples::assign_to_pointee<T2>(&t2),
548                         detail::tuples::assign_to_pointee<T3>(&t3),
549                         detail::tuples::assign_to_pointee<T4>(&t4),
550                         detail::tuples::assign_to_pointee<T6>(&t5),
551                         detail::tuples::assign_to_pointee<T5>(&t6));
552     }
553
554     // Tie variables into a tuple
555     template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
556     inline
557     tuple<detail::tuples::assign_to_pointee<T1>, 
558       detail::tuples::assign_to_pointee<T2>, 
559       detail::tuples::assign_to_pointee<T3>, 
560       detail::tuples::assign_to_pointee<T4>, 
561       detail::tuples::assign_to_pointee<T5>, 
562       detail::tuples::assign_to_pointee<T6>, 
563       detail::tuples::assign_to_pointee<T7> >
564     tie(T1& t1, T2& t2, T3& t3, T4& t4, T5 &t5, T6 &t6, T7 &t7)
565     {
566       return make_tuple(detail::tuples::assign_to_pointee<T1>(&t1),
567                         detail::tuples::assign_to_pointee<T2>(&t2),
568                         detail::tuples::assign_to_pointee<T3>(&t3),
569                         detail::tuples::assign_to_pointee<T4>(&t4),
570                         detail::tuples::assign_to_pointee<T5>(&t5),
571                         detail::tuples::assign_to_pointee<T6>(&t6),
572                         detail::tuples::assign_to_pointee<T7>(&t7));
573     }
574
575     // Tie variables into a tuple
576     template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
577     inline
578     tuple<detail::tuples::assign_to_pointee<T1>, 
579       detail::tuples::assign_to_pointee<T2>, 
580       detail::tuples::assign_to_pointee<T3>, 
581       detail::tuples::assign_to_pointee<T4>, 
582       detail::tuples::assign_to_pointee<T5>, 
583       detail::tuples::assign_to_pointee<T6>, 
584       detail::tuples::assign_to_pointee<T7>, 
585       detail::tuples::assign_to_pointee<T8> >
586     tie(T1& t1, T2& t2, T3& t3, T4& t4, T5 &t5, T6 &t6, T7 &t7, T8 &t8)
587     {
588       return make_tuple(detail::tuples::assign_to_pointee<T1>(&t1),
589                         detail::tuples::assign_to_pointee<T2>(&t2),
590                         detail::tuples::assign_to_pointee<T3>(&t3),
591                         detail::tuples::assign_to_pointee<T4>(&t4),
592                         detail::tuples::assign_to_pointee<T5>(&t5),
593                         detail::tuples::assign_to_pointee<T6>(&t6),
594                         detail::tuples::assign_to_pointee<T7>(&t7),
595                         detail::tuples::assign_to_pointee<T8>(&t8));
596     }
597
598     // Tie variables into a tuple
599     template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
600     inline
601     tuple<detail::tuples::assign_to_pointee<T1>, 
602       detail::tuples::assign_to_pointee<T2>, 
603       detail::tuples::assign_to_pointee<T3>, 
604       detail::tuples::assign_to_pointee<T4>, 
605       detail::tuples::assign_to_pointee<T5>, 
606       detail::tuples::assign_to_pointee<T6>, 
607       detail::tuples::assign_to_pointee<T7>, 
608       detail::tuples::assign_to_pointee<T8>, 
609       detail::tuples::assign_to_pointee<T9> >
610     tie(T1& t1, T2& t2, T3& t3, T4& t4, T5 &t5, T6 &t6, T7 &t7, T8 &t8, T9 &t9)
611     {
612       return make_tuple(detail::tuples::assign_to_pointee<T1>(&t1),
613                         detail::tuples::assign_to_pointee<T2>(&t2),
614                         detail::tuples::assign_to_pointee<T3>(&t3),
615                         detail::tuples::assign_to_pointee<T4>(&t4),
616                         detail::tuples::assign_to_pointee<T5>(&t5),
617                         detail::tuples::assign_to_pointee<T6>(&t6),
618                         detail::tuples::assign_to_pointee<T7>(&t7),
619                         detail::tuples::assign_to_pointee<T8>(&t8),
620                         detail::tuples::assign_to_pointee<T9>(&t9));
621     }
622     // Tie variables into a tuple
623     template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
624     inline
625     tuple<detail::tuples::assign_to_pointee<T1>, 
626       detail::tuples::assign_to_pointee<T2>, 
627       detail::tuples::assign_to_pointee<T3>, 
628       detail::tuples::assign_to_pointee<T4>, 
629       detail::tuples::assign_to_pointee<T5>, 
630       detail::tuples::assign_to_pointee<T6>, 
631       detail::tuples::assign_to_pointee<T7>, 
632       detail::tuples::assign_to_pointee<T8>, 
633       detail::tuples::assign_to_pointee<T9>, 
634       detail::tuples::assign_to_pointee<T10> >
635     tie(T1& t1, T2& t2, T3& t3, T4& t4, T5 &t5, T6 &t6, T7 &t7, T8 &t8, T9 &t9, T10 &t10)
636     {
637       return make_tuple(detail::tuples::assign_to_pointee<T1>(&t1),
638                         detail::tuples::assign_to_pointee<T2>(&t2),
639                         detail::tuples::assign_to_pointee<T3>(&t3),
640                         detail::tuples::assign_to_pointee<T4>(&t4),
641                         detail::tuples::assign_to_pointee<T5>(&t5),
642                         detail::tuples::assign_to_pointee<T6>(&t6),
643                         detail::tuples::assign_to_pointee<T7>(&t7),
644                         detail::tuples::assign_to_pointee<T8>(&t8),
645                         detail::tuples::assign_to_pointee<T9>(&t9),
646                         detail::tuples::assign_to_pointee<T10>(&t10));
647     }
648     // "ignore" allows tuple positions to be ignored when using "tie". 
649     namespace {
650       detail::tuples::swallow_assign ignore;
651     }
652
653 } // namespace boost
654 #endif // BOOST_TUPLE_BASIC_NO_PARTIAL_SPEC_HPP