Destructors, const structs, and opEquals
so
so at so.do
Sat Dec 4 08:31:48 PST 2010
> bool opEquals(auto ref inout Tuple rhs) inout {
> foreach (i, T; Types) {
> if (this[i] != rhs[i]) return false;
> }
> return true;
> }
>
> It looks a bit alembicated but let's not forget that Tuple is supposed
> to be very flexible and to do a lot of things.
Const-system is a one big abomination, considering the consequences it is
quite hard to say it is something good.
As complex as it may look, the above example addresses many problems of
this system. I would hate to write equal C++ code.
Please lets not add any more keyword/syntax, already forgot we had "auto
ref"...
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list