GSoC-2011 project:: Containers
Ishan Thilina
ishanthilina at gmail.com
Tue Apr 5 07:44:48 PDT 2011
-Steve wrote:
>There are several problems with your code.
>
>I'd recommend not putting your code in std.container at first. It will be
>easier to deal with, because people will know which code you wrote and
>also it will be better when posting code for questions.
Yes, sorry for that :).
>
>I see two problems right off the bat:
>
>1. your Range!T has two definitions for @property void front(T value)
>2. Range!T uses Node, which has no definition.
>
Rectified, but I still face problems.
>I'm guessing you meant Range!T to be a part of Queue? I'm not sure what
>you are doing exactly, because there are no usages of Queue in your code
>(i.e. it compiles because none of your templates are instantiated). If
>you want Range to be part of Queue, put it inside the definition of
>Queue. It will make things easier, and not pollute the namespace.
>Range!T is not a good name to put in the global namespace.
Yes, I want Range!T to be a part of the Queue. It's a forward range that allows to
iterate through he contents of the Queue.
I still have the original problem I had. I get this error when I try to compile.
"
/home/ishan/D/1.d(184): Error: no property 'opCall' for type 'test.Queue!(int).Queue'
"
What is this 'opCall' property? Is it something related to the instantiating a
container?
Below is the link for the new source code. It is much easier to read than the
previously uploaded one ;).
http://www.filejumbo.com/Download/0879EB4AAC636C75
More information about the Digitalmars-d
mailing list