lilypond-devel
[Top][All Lists]
Advanced

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

scheme max/min in c++


From: Mark Knoop
Subject: scheme max/min in c++
Date: Fri, 19 Aug 2016 12:12:26 +0100

Just trying out some more ideas for the keep-alive-together-engraver.
How do I use the Guile max/min functions on a scheme list in C++? I
have tried this:

SCM this_layer = group_spanners_[i]->get_property ("remove-layer");
SCM this_max;
if (scm_is_pair (this_layer))
  {
    this_max = scm_apply_0 (scm_max, this_layer);
  }

...but the compiler returns:

  error: cannot convert 'scm_unused_struct* (*)(SCM, SCM) {aka
  scm_unused_struct* (*)(scm_unused_struct*, scm_unused_struct*)}' to
  'SCM {aka scm_unused_struct*}' for argument '1' to 'scm_unused_struct*
  scm_apply_0(SCM, SCM)'

--
Mark Knoop



reply via email to

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