lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A disappointing C++ error


From: David Kastrup
Subject: A disappointing C++ error
Date: Tue, 08 Jun 2021 01:14:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

I tried inserting the following into
Time_signature_performer::process_music ():

      Moment base_moment = from_scm (get_property (this, "baseMoment"),
                                     Moment (Rational (1, 4)));

and I get the following out:

Making lily/out/time-signature-performer.o < cc
In file included from /usr/local/tmp/lilypond/lily/include/smobs.hh:23,
                 from /usr/local/tmp/lilypond/lily/include/moment.hh:23,
                 from /usr/local/tmp/lilypond/lily/include/audio-item.hh:24,
                 from time-signature-performer.cc:20:
/usr/local/tmp/lilypond/lily/include/lily-guile.hh: In instantiation of 'bool 
is_scm(SCM) [with T = Moment; SCM = scm_unused_struct*]':
/usr/local/tmp/lilypond/lily/include/lily-guile.hh:247:24:   required from 
'static T scm_conversions<T>::from_scm(SCM, T) [with T = Moment; SCM = 
scm_unused_struct*]'
/usr/local/tmp/lilypond/lily/include/lily-guile.hh:215:39:   required from 
'decltype (conv_scm_traits<T>::from(s)) from_scm(scm_unused_struct* const&, T) 
[with T = Moment; decltype (conv_scm_traits<T>::from(s)) = Moment; SCM = 
scm_unused_struct*]'
time-signature-performer.cc:69:62:   required from here
/usr/local/tmp/lilypond/lily/include/lily-guile.hh:196:37: error: 'is_scm' is 
not a member of 'scm_conversions<Moment>'
  196 |   return scm_conversions<T>::is_scm (s);
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/local/tmp/lilypond/lily/include/lily-guile.hh: In instantiation of 
'decltype (conv_scm_traits<T>::from(s)) from_scm(scm_unused_struct* const&) 
[with T = Moment; decltype (conv_scm_traits<T>::from(s)) = Moment; SCM = 
scm_unused_struct*]':
/usr/local/tmp/lilypond/lily/include/lily-guile.hh:208:24:   required from 
'decltype (conv_scm_traits<T>::from(s)) from_scm(scm_unused_struct*&) [with T = 
Moment; decltype (conv_scm_traits<T>::from(s)) = Moment; SCM = 
scm_unused_struct*]'
/usr/local/tmp/lilypond/lily/include/lily-guile.hh:247:44:   required from 
'static T scm_conversions<T>::from_scm(SCM, T) [with T = Moment; SCM = 
scm_unused_struct*]'
/usr/local/tmp/lilypond/lily/include/lily-guile.hh:215:39:   required from 
'decltype (conv_scm_traits<T>::from(s)) from_scm(scm_unused_struct* const&, T) 
[with T = Moment; decltype (conv_scm_traits<T>::from(s)) = Moment; SCM = 
scm_unused_struct*]'
time-signature-performer.cc:69:62:   required from here
/usr/local/tmp/lilypond/lily/include/lily-guile.hh:202:39: error: no matching 
function for call to 'scm_conversions<Moment>::from_scm(scm_unused_struct* 
const&)'
  202 |   return scm_conversions<T>::from_scm (s);
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/local/tmp/lilypond/lily/include/lily-guile.hh:245:12: note: candidate: 
'static T scm_conversions<T>::from_scm(SCM, T) [with T = Moment; SCM = 
scm_unused_struct*]'
  245 |   static T from_scm (SCM s, T fallback)
      |            ^~~~~~~~
/usr/local/tmp/lilypond/lily/include/lily-guile.hh:245:12: note:   candidate 
expects 2 arguments, 1 provided
make[1]: *** [/usr/local/tmp/lilypond/stepmake/stepmake/c++-rules.make:5: 
out/time-signature-performer.o] Error 1
make: *** [/usr/local/tmp/lilypond/stepmake/stepmake/generic-targets.make:6: 
all] Error 2

Now I am the culprit for much of the original code in lily-guile.hh
regarding the from_scm folderol, but I am somewhat at a loss about what
happens here after numerous changes of the original code (which may or
may not have worked: no idea).

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]