Fix missing volta bracket edge when using new double repeats.
[lilypond.git] / flower / include / tuple.hh
blob5f2705b8fab12501a9f615114eb7a32cb7b27e09
1 /*
2 tuple.hh -- declare Tuple
4 source file of the GNU LilyPond music typesetter
6 (c) 2006--2007 Han-Wen Nienhuys <hanwen@lilypond.org>
8 */
10 #ifndef TUPLE_HH
11 #define TUPLE_HH
13 template<class T, int N>
14 struct Tuple
16 T t_array[N];
17 Tuple ()
21 Tuple (T const *src)
23 for (int i = 0; i < N; i++)
24 t_array[i] = src[i];
28 template<class K>
29 struct Tuple2 : public Tuple<K, 2>
31 Tuple2 ()
36 Tuple2 (K a, K b)
38 Tuple<K,2> *p(this); // ugr.
40 p->t_array[0] = a;
41 p->t_array[1] = b;
46 template<class T, int N>
47 inline bool
48 operator<(Tuple<T, N> const &t1,
49 Tuple<T, N> const &t2)
51 for (int i = 0; i < N ; i++)
53 if (t1.t_array[i] > t2.t_array[i])
54 return false;
55 if (t1.t_array[i] < t2.t_array[i])
56 return true;
59 return false;
62 #endif /* TUPLE_HH */