Compile fix.
[lilypond.git] / lily / template5.cc
blobb669abb8994ef59bdbc51216cff3752c293233cb
1 /*
2 template5.cc -- instantiate Intervals
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include "moment.hh"
10 #include "real.hh"
11 #include "interval.hh"
13 #include "interval.tcc"
15 template<>
16 Rational
17 Interval_t<Rational>::infinity ()
19 Rational infty;
20 infty.set_infinite (1);
21 return infty;
25 template<>
26 string
27 Interval_t<Rational>::T_to_string (Rational a)
29 return a.to_string ();
32 template INTERVAL__INSTANTIATE (Rational);
35 template<>
36 Moment
37 Interval_t<Moment>::infinity ()
39 Moment infty;
41 infty.main_part_.set_infinite (1);
42 return infty;
46 template<>
47 string
48 Interval_t<Moment>::T_to_string (Moment a)
50 return a.to_string ();
53 template INTERVAL__INSTANTIATE (Moment);
55 template<>
56 Real
57 Interval_t<Real>::linear_combination (Real x) const
59 Drul_array<Real> da (at (LEFT), at (RIGHT));
60 return ::linear_combination (da, x);