Hi, On Wed, 23 May 2018, Richard Biener wrote:
> > alloc_flags (&cfun->cfg->bb_flag_pool); > > alloc_flags (&cfun->cfg->edge_flag_pool); > > You'll end up with sth like > > alloc_flags flag (BB_FLAG_POOL_FOR_FN (cfun)); > > then, mixing C++ RAII and macros! (eh) First: I don't see the problem. Second: if the above needs to use a macro you should have used a macro as well in your two classes. > Note you missed to name the variable you declare. Sure. > And yes, template deduction should make this work w/o writing > alloc_flags<int> flag (...). If you insist on an template, maybe. But why would you? Ciao, Michael.