On Apr 22, 2022, at 05:39, Jean Abou Samra <[email protected]> wrote:
>
> You both made a good point. My conclusion is that I should stick to
>
> {
> Local_assumption la (Lily::prebreak_estimate, SCM_BOOL_T);
> ...
> }
>
> where the constructor does everything, included scm_dynwind_begin ()
> and scm_dynwind_fluid (). That's safer and clearer, and never mind that
> you have to construct 3 contexts if you need 3 assumptions. I expect
> this to be very rare anyway.
Fine. At the time someone wants more than one assumption, we might be able to
add
Local_assumptions la {{fluid1, value1},
^ {fluid2, value2} /* etc. */ };
where the constructor accepts std::initializer_list<std::pair<Fluid, SCM>> but
I don't know if there are any problems related to GC (and I'm not planning to
work through that now).
—
Dan