[Issue 18732] New: Can use template as type in a templatized class

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 5 08:28:57 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18732

          Issue ID: 18732
           Summary: Can use template as type in a templatized class
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: b2.temp at gmx.com

---
class Foo(bool b)
{
    // can use Foo without template param
    static assert(__traits(compiles, new Foo));  // 1
    // because
    static assert(is(Foo == Foo!false));
}

void main()
{
    Foo!false foo;
}
---

The Q is: is line before comment 1 accepted on purpose ?

--


More information about the Digitalmars-d-bugs mailing list