lily-lexer.cc contains

   for (SCM scope : as_ly_scm_list (scopes_))
     ly_use_module (module, scope);

When I read this code again after modifying it some
time ago, my reaction was "what, scopes_ will be SCM_EOL
at the end of this iteration, didn't I introduce a big
bad bug??", but inserting debug message () statements
shows that this is not true.

I understand that ly_scm_list takes an rvalue and disallows
lvalues for clarity, while as_ly_scm_list takes an lvalue,
and will fail on an rvalue by design, with the failure being
a compilation failure since e67154f7e330b61c5d9a973fbb89bd56866a148e.

But I don't understand the real difference that distinguishes
them. Before that commit, what would have been the difference
between as_ly_scm_list (lvalue) and ly_scm_list (lvalue)?

Thanks,
Jean


Reply via email to