Making TypeInfo.next() return a const(TypeInfo) was a bad idea
Alex Rønne Petersen
alex at lycus.org
Sun Oct 14 17:20:23 PDT 2012
On 14-10-2012 12:19, Benjamin Thaut wrote:
> Because you are now no longer able to do stuff like this:
>
> void log(...)
> {
> auto t = _arguments[0];
> while(some condition)
> {
> t = t.next();
> }
> }
>
> To be actually able to use TypeInfo.next you will now need the ConstRef
> (hack) from phobos. Afaik there is no such thing in druntime which makes
> working with TypeInfo.next within druntime a real pita.
>
> Any suggestions?
>
> Kind Regards
> Benjamin Thaut
None, to be honest. I can only recommend going with a cast hack or
something similar for now.
But this is a problem we *must* solve. It is something I also ran into
often while hacking on druntime.
--
Alex Rønne Petersen
alex at lycus.org
http://lycus.org
More information about the Digitalmars-d
mailing list