15#elif defined HAVE_TR1_TUPLE
39 struct TupleAccessTraits
42 typedef T& NonConstType;
47 struct TupleAccessTraits<T*>
50 typedef T* NonConstType;
51 typedef T* ParameterType;
55 struct TupleAccessTraits<T&>
58 typedef T& NonConstType;
59 typedef T& ParameterType;
64#elif defined HAVE_TR1_TUPLE
65 using std::tr1::tuple;
75 inline const Nil nullType()
86 template<
typename T1,
typename TT>
118 template<
typename T2,
typename T3,
typename T4,
typename T5,
119 typename T6,
typename T7,
typename T8,
typename T9>
120 Pair(
typename TupleAccessTraits<T1>::ParameterType t1, T2& t2, T3& t3, T4& t4, T5& t5,
121 T6& t6, T7& t7, T8& t8, T9& t9);
129 Pair(
typename TupleAccessTraits<Type1>::ParameterType t1, TT& t2);
137 template<
typename U1,
typename U2>
144 template<
typename U1,
typename U2>
153 typename TupleAccessTraits<Type1>::NonConstType
first();
159 typename TupleAccessTraits<Type1>::ConstType
166 typename TupleAccessTraits<Type2>::NonConstType
173 typename TupleAccessTraits<Type2>::ConstType
187 template<
typename T1>
206 Pair(
typename TupleAccessTraits<T1>::ParameterType
first,
const Nil&,
const Nil&,
const Nil&,
const Nil&,
213 Pair(
typename TupleAccessTraits<T1>::ParameterType
first,
221 template<
typename T2>
227 template<
typename T2>
239 typename TupleAccessTraits<Type1>::NonConstType
246 typename TupleAccessTraits<Type1>::ConstType
257 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
258 typename T6,
typename T7,
typename T8,
typename T9>
267 template<
typename T1>
290 template<
typename T1 =
Nil,
typename T2 =
Nil,
typename T3 =
Nil,
291 typename T4 =
Nil,
typename T5 =
Nil,
typename T6 =
Nil,
292 typename T7 =
Nil,
typename T8 =
Nil,
typename T9 =
Nil>
302 tuple(
typename TupleAccessTraits<T1>::ParameterType t1)
303 :
FirstPair(t1, nullType(), nullType(), nullType(),
304 nullType(), nullType(), nullType(), nullType(),
308 tuple(
typename TupleAccessTraits<T1>::ParameterType t1,
309 typename TupleAccessTraits<T2>::ParameterType t2)
310 :
FirstPair(t1, t2, nullType(), nullType(),
311 nullType(), nullType(), nullType(), nullType(),
315 tuple(
typename TupleAccessTraits<T1>::ParameterType t1,
316 typename TupleAccessTraits<T2>::ParameterType t2,
317 typename TupleAccessTraits<T3>::ParameterType t3)
319 nullType(), nullType(), nullType(), nullType(),
323 tuple(
typename TupleAccessTraits<T1>::ParameterType t1,
324 typename TupleAccessTraits<T2>::ParameterType t2,
325 typename TupleAccessTraits<T3>::ParameterType t3,
326 typename TupleAccessTraits<T4>::ParameterType t4)
328 nullType(), nullType(), nullType(), nullType(),
332 tuple(
typename TupleAccessTraits<T1>::ParameterType t1,
333 typename TupleAccessTraits<T2>::ParameterType t2,
334 typename TupleAccessTraits<T3>::ParameterType t3,
335 typename TupleAccessTraits<T4>::ParameterType t4,
336 typename TupleAccessTraits<T5>::ParameterType t5)
338 t5, nullType(), nullType(), nullType(),
342 tuple(
typename TupleAccessTraits<T1>::ParameterType t1,
343 typename TupleAccessTraits<T2>::ParameterType t2,
344 typename TupleAccessTraits<T3>::ParameterType t3,
345 typename TupleAccessTraits<T4>::ParameterType t4,
346 typename TupleAccessTraits<T5>::ParameterType t5,
347 typename TupleAccessTraits<T6>::ParameterType t6)
349 t5, t6, nullType(), nullType(),
353 tuple(
typename TupleAccessTraits<T1>::ParameterType t1,
354 typename TupleAccessTraits<T2>::ParameterType t2,
355 typename TupleAccessTraits<T3>::ParameterType t3,
356 typename TupleAccessTraits<T4>::ParameterType t4,
357 typename TupleAccessTraits<T5>::ParameterType t5,
358 typename TupleAccessTraits<T6>::ParameterType t6,
359 typename TupleAccessTraits<T7>::ParameterType t7)
361 t5, t6, t7, nullType(),
365 tuple(
typename TupleAccessTraits<T1>::ParameterType t1,
366 typename TupleAccessTraits<T2>::ParameterType t2,
367 typename TupleAccessTraits<T3>::ParameterType t3,
368 typename TupleAccessTraits<T4>::ParameterType t4,
369 typename TupleAccessTraits<T5>::ParameterType t5,
370 typename TupleAccessTraits<T6>::ParameterType t6,
371 typename TupleAccessTraits<T7>::ParameterType t7,
372 typename TupleAccessTraits<T8>::ParameterType t8)
378 tuple(
typename TupleAccessTraits<T1>::ParameterType t1,
379 typename TupleAccessTraits<T2>::ParameterType t2,
380 typename TupleAccessTraits<T3>::ParameterType t3,
381 typename TupleAccessTraits<T4>::ParameterType t4,
382 typename TupleAccessTraits<T5>::ParameterType t5,
383 typename TupleAccessTraits<T6>::ParameterType t6,
384 typename TupleAccessTraits<T7>::ParameterType t7,
385 typename TupleAccessTraits<T8>::ParameterType t8,
386 typename TupleAccessTraits<T9>::ParameterType t9)
387 :
FirstPair(t1, t2, t3, t4, t5, t6, t7, t8, t9)
390 template<
class U1,
class U2>
391 tuple& operator=(
const Pair<U1,U2>& other)
401 using std::tuple_element;
402#elif defined HAVE_TR1_TUPLE
403 using std::tr1::tuple_element;
408 template<
int N,
class Tuple>
418 template<
int N,
typename T1,
typename T2>
431 template<
typename T1,
typename T2>
443#if defined HAVE_TUPLE || defined HAVE_TR1_TUPLE
446#elif defined HAVE_TR1_TUPLE
464 template<
typename T1,
typename T2>
465 static typename TupleAccessTraits<
478 template<
typename T1,
typename T2>
479 static typename TupleAccessTraits<
499 template<
typename T1,
typename T2>
510 template<
typename T1,
typename T2>
517 template<
int i,
typename T1,
typename T2,
typename T3,
typename T4,
518 typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
519 typename TupleAccessTraits<typename tuple_element<i, tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9> >::type>
521 get(tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9>& t)
526 template<
int i,
typename T1,
typename T2,
typename T3,
typename T4,
527 typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
528 typename TupleAccessTraits<typename tuple_element<i, tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9> >::type>
530 get(
const tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9>& t)
538 using std::tuple_size;
539#elif defined HAVE_TR1_TUPLE
540 using std::tr1::tuple_size;
557 template<
typename T1,
typename T2>
564 template<
typename T1>
565 struct tuple_size<Pair<T1,Nil> >
571 struct tuple_size<Pair<Nil,Nil> >
580 using std::make_tuple;
581#elif defined HAVE_TR1_TUPLE
583 using std::tr1::make_tuple;
591 static std::ostream& put(std::ostream& os,
const T& t,
const char* delim=
", ")
593 return tuple_writer<i-1>::put(os,t,delim)<<delim<<Dune::get<i-1>(t);
597 static std::istream &get ( std::istream &is, T &t,
const char *delim =
"," )
599 tuple_writer< i-1 >::get( is, t, delim );
600 for(
const char *it = delim; is && (*it != 0); ++it )
605 is.setstate( std::ios::failbit );
607 return is >> Dune::get< i-1 >( t );
612 struct tuple_writer<1>
615 static std::ostream& put(std::ostream& os,
const T& t,
const char* delim=
", ")
618 return os<<Dune::get<0>(t);
622 static std::istream &get ( std::istream &is, T &t,
const char *delim =
", " )
624 return is >> Dune::get< 0 >( t );
629 struct tuple_writer<0>
632 static std::ostream& put(std::ostream& os,
const T& t,
const char* delim=
", ")
638 static std::istream &get ( std::istream &is, T &t,
const char *delim =
", " )
644#if defined HAVE_TUPLE || defined HAVE_TR1_TUPLE
648 template<
typename T1>
649 inline std::ostream&
operator<<( std::ostream& os,
const tuple<T1> & t)
651 typedef tuple<T1> TupleT;
652 return tuple_writer<tuple_size<TupleT>::value>::put(os, t);
655 template<
typename T1,
typename T2>
656 inline std::ostream&
operator<<( std::ostream& os,
const tuple<T1,T2> & t)
658 typedef tuple<T1,T2> TupleT;
659 return tuple_writer<tuple_size<TupleT>::value>::put(os, t);
662 template<
typename T1,
typename T2,
typename T3>
663 inline std::ostream&
operator<<( std::ostream& os,
const tuple<T1,T2,T3> & t)
665 typedef tuple<T1,T2,T3> TupleT;
666 return tuple_writer<tuple_size<TupleT>::value>::put(os, t);
669 template<
typename T1,
typename T2,
typename T3,
typename T4>
670 inline std::ostream&
operator<<( std::ostream& os,
const tuple<T1,T2,T3,T4> & t)
672 typedef tuple<T1,T2,T3,T4> TupleT;
673 return tuple_writer<tuple_size<TupleT>::value>::put(os, t);
676 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
677 inline std::ostream&
operator<<( std::ostream& os,
const tuple<T1,T2,T3,T4,T5> & t)
679 typedef tuple<T1,T2,T3,T4,T5> TupleT;
680 return tuple_writer<tuple_size<TupleT>::value>::put(os, t);
683 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
684 inline std::ostream&
operator<<( std::ostream& os,
const tuple<T1,T2,T3,T4,T5,T6> & t)
686 typedef tuple<T1,T2,T3,T4,T5,T6> TupleT;
687 return tuple_writer<tuple_size<TupleT>::value>::put(os, t);
690 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
691 inline std::ostream&
operator<<( std::ostream& os,
const tuple<T1,T2,T3,T4,T5,T6,T7> & t)
693 typedef tuple<T1,T2,T3,T4,T5,T6,T7> TupleT;
694 return tuple_writer<tuple_size<TupleT>::value>::put(os, t);
697 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
699 inline std::ostream&
operator<<( std::ostream& os,
const tuple<T1,T2,T3,T4,T5,T6,T7,T8> & t)
701 typedef tuple<T1,T2,T3,T4,T5,T6,T7,T8> TupleT;
702 return tuple_writer<tuple_size<TupleT>::value>::put(os, t);
705 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
706 typename T8,
typename T9>
707 inline std::ostream&
operator<<( std::ostream& os,
const tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9> & t)
709 typedef tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9> TupleT;
710 return tuple_writer<tuple_size<TupleT>::value>::put(os, t);
713 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
714 typename T8,
typename T9,
typename T10>
715 inline std::ostream&
operator<<( std::ostream& os,
const tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> & t)
717 typedef tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> TupleT;
718 return tuple_writer<tuple_size<TupleT>::value>::put(os, t);
724 template<
typename T1>
725 inline std::istream&
operator>>( std::istream& is, tuple<T1> & t)
727 typedef tuple<T1> TupleT;
728 return tuple_writer<tuple_size<TupleT>::value>::get(is, t);
731 template<
typename T1,
typename T2>
732 inline std::istream&
operator>>( std::istream& is, tuple<T1,T2> & t)
734 typedef tuple<T1,T2> TupleT;
735 return tuple_writer<tuple_size<TupleT>::value>::get(is, t);
738 template<
typename T1,
typename T2,
typename T3>
739 inline std::istream&
operator>>( std::istream& is, tuple<T1,T2,T3> & t)
741 typedef tuple<T1,T2,T3> TupleT;
742 return tuple_writer<tuple_size<TupleT>::value>::get(is, t);
745 template<
typename T1,
typename T2,
typename T3,
typename T4>
746 inline std::istream&
operator>>( std::istream& is, tuple<T1,T2,T3,T4> & t)
748 typedef tuple<T1,T2,T3,T4> TupleT;
749 return tuple_writer<tuple_size<TupleT>::value>::get(is, t);
752 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
753 inline std::istream&
operator>>( std::istream& is, tuple<T1,T2,T3,T4,T5> & t)
755 typedef tuple<T1,T2,T3,T4,T5> TupleT;
756 return tuple_writer<tuple_size<TupleT>::value>::get(is, t);
759 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
760 inline std::istream&
operator>>( std::istream& is, tuple<T1,T2,T3,T4,T5,T6> & t)
762 typedef tuple<T1,T2,T3,T4,T5,T6> TupleT;
763 return tuple_writer<tuple_size<TupleT>::value>::get(is, t);
766 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
767 inline std::istream&
operator>>( std::istream& is, tuple<T1,T2,T3,T4,T5,T6,T7> & t)
769 typedef tuple<T1,T2,T3,T4,T5,T6,T7> TupleT;
770 return tuple_writer<tuple_size<TupleT>::value>::get(is, t);
773 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
775 inline std::istream&
operator>>( std::istream& is, tuple<T1,T2,T3,T4,T5,T6,T7,T8> & t)
777 typedef tuple<T1,T2,T3,T4,T5,T6,T7,T8> TupleT;
778 return tuple_writer<tuple_size<TupleT>::value>::get(is, t);
781 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
782 typename T8,
typename T9>
783 inline std::istream&
operator>>( std::istream& is, tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9> & t)
785 typedef tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9> TupleT;
786 return tuple_writer<tuple_size<TupleT>::value>::get(is, t);
789 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
790 typename T8,
typename T9,
typename T10>
791 inline std::istream&
operator>>( std::istream& is, tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> & t)
793 typedef tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> TupleT;
794 return tuple_writer<tuple_size<TupleT>::value>::get(is, t);
802 template<
typename T1,
typename T2,
typename U1,
typename U2>
813 template<
typename T1,
typename T2,
typename U1,
typename U2>
824 template<
typename T1,
typename T2,
typename U1,
typename U2>
836 template<
typename T1,
typename U1>
847 template<
typename T1,
typename U1>
851 "T1 and U1 have to be interoperable, i.e., either "
852 "conversion from one to the other must exist." );
861 template<
typename T1,
typename U1>
874 template<
typename T1,
typename U1,
typename U2>
886 template<
typename T1,
typename U1,
typename U2>
899 template<
typename T1,
typename T2,
typename U1>
911 template<
typename T1,
typename T2,
typename U1>
922 template<
typename T1,
typename T2>
931 template<
typename T1,
typename T2>
938 template<
typename T1>
939 inline std::ostream&
operator<<(std::ostream& os,
const Pair<T1,Nil>& pair)
948 template<
typename T1,
typename T2>
954 template<
typename T1>
955 inline std::istream&
operator>>(std::istream& is, Pair<T1,Nil>& pair)
957 return is >> pair.first();
961 inline tuple<T1&> tie(T1& t1) {
962 return tuple<T1&> (t1);
965 template<
class T1,
class T2>
966 inline tuple<T1&, T2&> tie(T1& t1, T2& t2) {
967 return tuple<T1&, T2&> (t1, t2);
970 template<
class T1,
class T2,
class T3>
971 inline tuple<T1&, T2&, T3&> tie(T1& t1, T2& t2, T3& t3) {
972 return tuple<T1&, T2&, T3&> (t1, t2, t3);
975 template<
class T1,
class T2,
class T3,
class T4>
976 inline tuple<T1&, T2&, T3&, T4&> tie(T1& t1, T2& t2, T3& t3, T4& t4) {
977 return tuple<T1&, T2&, T3&, T4&> (t1, t2, t3, t4);
980 template<
class T1,
class T2,
class T3,
class T4,
class T5>
981 inline tuple<T1&, T2&, T3&, T4&, T5&>
982 tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5) {
983 return tuple<T1&, T2&, T3&, T4&, T5&> (t1, t2, t3, t4, t5);
986 template<
class T1,
class T2,
class T3,
class T4,
class T5,
class T6>
987 inline tuple<T1&, T2&, T3&, T4&, T5&, T6&>
988 tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6) {
989 return tuple<T1&, T2&, T3&, T4&, T5&, T6&> (t1, t2, t3, t4, t5, t6);
992 template<
class T1,
class T2,
class T3,
class T4,
class T5,
class T6,
class T7>
993 inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&>
994 tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7) {
995 return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&> (t1, t2, t3, t4, t5, t6, t7);
998 template<
class T1,
class T2,
class T3,
class T4,
class T5,
class T6,
class T7,
1000 inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&>
1001 tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8) {
1002 return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&>
1003 (t1, t2, t3, t4, t5, t6, t7, t8);
1006 template<
class T1,
class T2,
class T3,
class T4,
class T5,
class T6,
class T7,
1008 inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&>
1009 tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9) {
1010 return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&>
1011 (t1, t2, t3, t4, t5, t6, t7, t8, t9);
1015 inline tuple<T1> make_tuple(
const T1& t1) {
1016 return tuple<T1> (t1);
1019 template<
class T1,
class T2>
1020 inline tuple<T1, T2> make_tuple(
const T1& t1,
const T2& t2) {
1021 return tuple<T1, T2> (t1, t2);
1024 template<
class T1,
class T2,
class T3>
1025 inline tuple<T1, T2, T3> make_tuple(
const T1& t1,
const T2& t2,
const T3& t3) {
1026 return tuple<T1, T2, T3> (t1, t2, t3);
1029 template<
class T1,
class T2,
class T3,
class T4>
1030 inline tuple<T1, T2, T3, T4> make_tuple(
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4) {
1031 return tuple<T1, T2, T3, T4> (t1, t2, t3, t4);
1034 template<
class T1,
class T2,
class T3,
class T4,
class T5>
1035 inline tuple<T1, T2, T3, T4, T5>
1036 make_tuple(
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5) {
1037 return tuple<T1, T2, T3, T4, T5> (t1, t2, t3, t4, t5);
1040 template<
class T1,
class T2,
class T3,
class T4,
class T5,
class T6>
1041 inline tuple<T1, T2, T3, T4, T5, T6>
1042 make_tuple(
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5,
const T6& t6) {
1043 return tuple<T1, T2, T3, T4, T5, T6> (t1, t2, t3, t4, t5, t6);
1046 template<
class T1,
class T2,
class T3,
class T4,
class T5,
class T6,
class T7>
1047 inline tuple<T1, T2, T3, T4, T5, T6, T7>
1048 make_tuple(
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5,
const T6& t6,
1050 return tuple<T1, T2, T3, T4, T5, T6, T7> (t1, t2, t3, t4, t5, t6, t7);
1053 template<
class T1,
class T2,
class T3,
class T4,
class T5,
class T6,
class T7,
1055 inline tuple<T1, T2, T3, T4, T5, T6, T7, T8>
1056 make_tuple(
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5,
const T6& t6,
1057 const T7& t7,
const T8& t8) {
1058 return tuple<T1, T2, T3, T4, T5, T6, T7, T8>
1059 (t1, t2, t3, t4, t5, t6, t7, t8);
1062 template<
class T1,
class T2,
class T3,
class T4,
class T5,
class T6,
class T7,
1064 inline tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>
1065 make_tuple(
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5,
const T6& t6,
1066 const T7& t7,
const T8& t8,
const T9& t9) {
1067 return tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>
1068 (t1, t2, t3, t4, t5, t6, t7, t8, t9);
1071 template<
typename T1,
typename TT>
1072 template<
typename T2,
typename T3,
typename T4,
typename T5,
1073 typename T6,
typename T7,
typename T8,
typename T9>
1075 T2& t2, T3& t3, T4& t4, T5& t5,
1076 T6& t6, T7& t7, T8& t8, T9& t9)
1077 : first_(first), second_(t2,t3,t4,t5,t6,t7,t8,t9, nullType())
1080 template <
typename T1,
typename TT>
1082 : first_(first), second_(second)
1085 template<
typename T1,
typename T2>
1087 : first_(), second_()
1090 template<
typename T1,
typename T2>
1091 template<
typename U1,
typename U2>
1093 : first_(other.first_), second_(other.second_)
1096 template<
typename T1,
typename T2>
1097 template<
typename U1,
typename U2>
1105 template<
typename T1,
typename T2>
1109 second_=other.second_;
1113 template<
typename T1,
typename T2>
1114 inline typename TupleAccessTraits<T1>::NonConstType
1120 template<
typename T1,
typename T2>
1121 inline typename TupleAccessTraits<T1>::ConstType
1128 template<
typename T1,
typename T2>
1129 inline typename TupleAccessTraits<T2>::NonConstType
1135 template<
typename T1,
typename T2>
1136 inline typename TupleAccessTraits<T2>::ConstType
1142 template<
typename T1>
1149 template <
typename T1>
1155 template<
typename T1>
1160 template<
typename T1>
1161 template<
typename T2>
1163 : first_(other.first_)
1166 template<
typename T1>
1167 template<
typename T2>
1175 template<
typename T1>
1182 template<
typename T1>
1183 inline typename TupleAccessTraits<T1>::NonConstType
1189 template<
typename T1>
1190 inline typename TupleAccessTraits<T1>::ConstType
A Tuple of objects.
Definition: tuples.hh:294
#define dune_static_assert(COND, MSG)
Helper template so that compilation fails if condition is not true.
Definition: static_assert.hh:79
static TupleAccessTraits< T1 >::ConstType get(const Pair< T1, T2 > &tuple)
Get the first element of the tuple.
Definition: tuples.hh:511
static TupleAccessTraits< typenametuple_element< N, Pair< T1, T2 > >::type >::ConstType get(const Pair< T1, T2 > &tuple)
Get the N-th element of the tuple.
Definition: tuples.hh:482
TupleAccessTraits< Type2 >::NonConstType second()
Get the second value.
Definition: tuples.hh:1130
Nil Type2
The type of the (non-existent) second field is Nil. This typedef is useful in template metaprogrammin...
Definition: tuples.hh:200
Type1 first_
The value of the first field.
Definition: tuples.hh:177
Type2 second_
The value of the second field.
Definition: tuples.hh:179
tuple_element< N, typenameTuple::FirstPair >::type type
The type of the N-th element of the tuple.
Definition: tuples.hh:414
Pair< T1, T2 > makePair(const T1 &first, const T2 &second)
Create a tuple and initialize it.
Definition: tuples.hh:923
tuple_element< N-1, T2 >::Type type
The type of the N-th element of the tuple.
Definition: tuples.hh:424
Pair & operator=(const Pair< T2, Nil > &other)
Assignment operator for type conversion.
T1 type
The type of the first element of the tuple.
Definition: tuples.hh:437
static TupleAccessTraits< typenametuple_element< N, Pair< T1, T2 > >::type >::NonConstType get(Pair< T1, T2 > &tuple)
Get the N-th element of the tuple.
Definition: tuples.hh:468
std::ostream & operator<<(std::ostream &s, const array< T, N > &e)
Output operator for array.
Definition: array.hh:159
T1 Type1
The type of the first field.
Definition: tuples.hh:92
TT Type2
The type of the second field.
Definition: tuples.hh:97
std::istream & operator>>(std::istream &is, Pair< T1, T2 > &pair)
Read a pair or tuple.
Definition: tuples.hh:949
TupleAccessTraits< Type1 >::NonConstType first()
Get the first value.
Definition: tuples.hh:1115
Pair & operator=(const Pair< U1, U2 > &other)
Assignment operator for implicit type conversion.
Type1 first_
The value of the first field.
Definition: tuples.hh:250
TupleToPairs< T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Type FirstPair
Type of the first Pair defining the Tuple.
Definition: tuples.hh:297
TupleAccessTraits< Type1 >::NonConstType first()
Get the first value.
Definition: tuples.hh:1184
T1 Type1
The type of the first field.
Definition: tuples.hh:193
static TupleAccessTraits< T1 >::NonConstType get(Pair< T1, T2 > &tuple)
Get the first element of the tuple.
Definition: tuples.hh:500
EnableIfInterOperable< T1, T2, bool >::type operator==(const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs)
Checks for equality.
Definition: iteratorfacades.hh:231
EnableIfInterOperable< T1, T2, bool >::type operator!=(const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs)
Checks for inequality.
Definition: iteratorfacades.hh:253
Dune namespace.
Definition: alignment.hh:14
Fallback implementation of the C++0x static_assert feature.
T UnqualifiedType
The unqualified type.
Definition: typetraits.hh:93
const T ConstType
The const type.
Definition: typetraits.hh:95
Get the N-th element of a tuple.
Definition: tuples.hh:458
Checks wether two types are interoperable.
Definition: typetraits.hh:308
An empty class.
Definition: tuples.hh:71
A tuple consisting of one object. Specialization of Pair that really is a single value.
Definition: tuples.hh:189
A tuple consisting of two objects.
Definition: tuples.hh:88
Converts the Tuple to a list of pairs.
Definition: tuples.hh:260
Get the type of the N-th element of the tuple.
Definition: tuples.hh:410
Template meta_programm to query the size of a tuple.
Definition: tuples.hh:548
Traits for type conversions and type information.
Definition of the DUNE_UNUSED macro for the case that config.h is not available.
#define DUNE_UNUSED_PARAMETER(parm)
A macro to mark intentional unused function parameters with.
Definition: unused.hh:18