DList!(Tuple!(TypeInfo_Class)) causes compilation error
Zhenya
zheny at list.ru
Sun Dec 30 13:39:22 PST 2012
On Sunday, 30 December 2012 at 21:30:04 UTC, monarch_dodra wrote:
> On Sunday, 30 December 2012 at 20:09:57 UTC, Zhenya wrote:
>> Hi!
>> I just need DList!(Tuple!(TypeInfo_Class)) for my
>> n-dimensional dispatcher,
>> but compiler says:
>>
>> Error: function
>> std.typecons.Tuple!(TypeInfo_Class).Tuple.opEquals!(const(Tuple!(TypeInfo_Class))).opEquals
>> (const(Tuple!(TypeInfo_Class)) rhs) is not callable using
>> argument types (const(Tuple!(TypeInfo_Class))) const
>>
>> Could you give me some advice/workaround for this?
>
> Sounds like a bug in Tuple.opEqual: It, and its arguments,
> should be const qualified, but aren't. I'll try and get it
> fixed for 2.061.
>
> In the mean time, you *could* try changing std.typecons.Tuple's
> opEqual:
>
> From:
> bool opEquals(R)(R rhs) if (isTuple!R)
> To:
> bool opEquals(R)(const R rhs) const if (isTuple!R)
>
> But I have not thoroughly tested this, so use at your own risk.
Thank you,that works.
More information about the Digitalmars-d-learn
mailing list