[Issue 10919] New: typeof should accept types

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 28 23:52:25 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10919

           Summary: typeof should accept types
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: doob at me.com


--- Comment #0 from Jacob Carlborg <doob at me.com> 2013-08-28 23:52:24 PDT ---
Currently typeof only accepts expressions. I think it would be useful if typeof
accepts types as well and just evaluate to the type given. This will make
metaprogramming simpler.

void foo (alias T) ()
{
    alias U = typeof(T);
}

foo!(3); // ok
foo!(Object); // error, Object is not an expression

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list