Typeof woes
Jacob Carlborg
doob at me.com
Tue Aug 20 23:32:35 PDT 2013
On 2013-08-21 02:24, Andrej Mitrovic wrote:
> I am beginning to wonder if typeof(typeof(expr)) is worthy of an
> error. Would we end up having any bugs if we were to allow typeof() to
> work on types (IOW it would just alias itself to the type)?
>
> I guess the only way to find out is to try it out in a compiler
> branch, but I'm genuinely curious.
As we have seen, not allowing typeof to accept types makes some generic
code a bit more cumbersome to write.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list