I wonder if you can 'chain' them: Dynwind_context dwc2(dwc);
(you can at a minimum 'pause' dwc so to emit a runtime message that the "wrong" thing is happening, but I guess you could hand yourself to your parent and do more sophisticated shenanigans too... I must say I loathe this stateful stuff though) L On Thu, Apr 21, 2022 at 12:23 PM Dan Eble <dan@lyric.works> wrote: > On Apr 21, 2022, at 02:55, Luca Fascione <l.fasci...@gmail.com> wrote: > > > > I'd think you can up this by one, and get a cleaner looking piece of code > > if you implement scm_dynwind_fluid() as a forwarded method on your > context: > ... > > dwc.fluid (fluid2, value2); > > Here's something that does bother me. That reads as if dwc holds state > affecting the outcome, which is untrue. > > { > Dynwind_context dwc; > // . . . > > { > Dynwind_context dwc2; > // . . . > dwc.free (p); // not what it seems > // . . . > } > } > > The scm_ functions operate implicitly on the current context. Dressing > them differently would be confusing. > — > Dan > > -- Luca Fascione Distinguished Engineer - Ray Tracing - NVIDIA