Re: Glib::Flags overloaded mutators



Kevin Ryde wrote:
It'd be good if Glib::Flags had overloaded += as well as + so you could
go

      $f += 'val';

I think the basic overload can be used without too much trouble, the new
object returned being assigned to the destination automatically by
"overload".

Actually, I think this is supposed to work correctly right now.  The
"fallback => 1" argument to overload tells it to use "magic
autogeneration" of operators that aren't overloaded.  For example, "+="
is supposed to be automatically implemented with just "+".

Consequently, the new test cases you sent pass for me without the code
changes you also provided.

Is there something else I missed?

-- 
Bye,
-Torsten



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]