Strange Error using parameterized opAssign for a struct
d coder
dlang.coder at gmail.com
Tue Jul 5 00:50:12 PDT 2011
>
>
> Robert suggested that I put my opAssign method as:
>
> void opAssign (T:Foo!NN,size_t NN)(T f) { }
>
> That works. But I want to find out if it is possible to write the opAssign
> template method with a conditional in the following form. This will help me
> optimize code better. Kindly suggest what would come in place of .......
> below.
>
> void opAssign (T)(T f) if(is(T .......)) { }
>
void opAssign (T)(T f) if(is(T L : Foo!(NN,MM), int NN, int MM)) { }
I found that the above declaration compiles. But again it compiles with int
as parameter type. Fails for size_t.
Any other idea?
Regards
- Puneet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110705/7cbc5483/attachment.html>
More information about the Digitalmars-d
mailing list