DMD 1.026 and 2.010 releases

Aarti_pl aarti at interia.pl
Mon Jan 21 00:04:08 PST 2008


Walter Bright pisze:
> Extrawurst wrote:
>> "
>> opAssign can no longer be overloaded for class objects.
>> "
>>
>> why is that ? that change breaks lots of my code... ;(
> 
> I didn't realize anyone was using it. What are you using it for?

Well, I will answer as it broke (also) my code...

In doost I have something like this:

----
Any opAssign(ValueType)(ValueType value) {
	content=new Holder!(ValueType)(value);
         return this;
}
----

Currently there is no way to initialize template class using "standard" way:

1. No templated constructors
2. No templated opAssign

Now only solution is to use template function e.g. assign

Was it really necessary? Why? I was hoping rather to get templated 
constructors...

BR
Marcin Kuszczak
(aarti_pl)


More information about the Digitalmars-d-announce mailing list