[PATCH v2 1/2] [gdb] Add template functions assign_return/set_if_changed

Tom de Vries tdevries@suse.de
Mon Jun 19 09:19:44 GMT 2023


On 6/8/23 11:17, Tom de Vries via Gdb-patches wrote:
> template<typename T> void assign_set_if_changed (T &lval, T val, bool &changed)
> { ... }
> template<typename T> bool assign_return_if_changed (T &lval, T val)
> { ... }

I realize that "T val" could mean calling a copy constructor for passing 
the argument, so I've changed this into a "const T &val".

With that change, I've pushed the series.

Thanks,
- Tom


More information about the Gdb-patches mailing list