www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2693] New: Instantiations of templates containing __traits fail in is()

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2693

           Summary: Instantiations of templates containing __traits fail in
                    is()
           Product: D
           Version: 2.025
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: samukha voliacable.com


template Foo()
{
    static if (!__traits(compiles, fail))
    {
        alias int Foo;
    }        
}

//alias Foo!() a; // uncomment to compile
static assert(is(Foo!() == int)); // fails

This is not a 'static assert' problem


-- 
Feb 27 2009
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2693


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED


--- Comment #1 from yebblies <yebblies gmail.com> 2011-06-10 08:07:58 PDT ---
This works in current dmd2.053

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