[phobos] An update to std.variant broke std.concurrency.prioritySend
Sean Kelly
sean at invisibleduck.org
Thu Sep 30 11:43:56 PDT 2010
Yeah, my fix was to check if T(rhs) compiles and if so, copy-construct the value passed to variant instead of default-initializing it and then doing an assignment. I don't know why this worked in the past... maybe it really was a compiler bug like you said.
By the way, I'll have to file a bug report about the broken error output from DMD. It used the line number from the top-level instantiating file and I can't recall if the filename was correct or not. Also, a compile failure because of a constraint failure should probably report a full instantiation trace like static assert does. Right now it just reports the overload error.
On Sep 30, 2010, at 11:19 AM, Andrei Alexandrescu wrote:
> But Tuple can't have a default constructor. The fix might be relying on a compiler bug (as it has happened in the past with Tuple).
>
> Andrei
>
> On 9/30/10 10:56 PDT, Sean Kelly wrote:
>> Got it. It's currently not possible to store a Tuple inside a Variant because Tuple has no default ctor. Fix forthcoming.
>>
>> On Sep 30, 2010, at 9:54 AM, Sean Kelly wrote:
>>
>>> Oops, looks like a compiler bug is reporting the wrong location. Well, a change somewhere broke prioritySend. Trying to find the spot.
>>>
>>> On Sep 30, 2010, at 9:49 AM, Sean Kelly wrote:
>>>
>>>> It doesn't compile any longer. It's been a while since I updated so I don't know the exact revision. I'll roll back and see if I can find it... and then add prioritySend in a unittest so this doesn't happen again.
>>>> _______________________________________________
>>>> phobos mailing list
>>>> phobos at puremagic.com
>>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
More information about the phobos
mailing list