www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14425] New: Indirect template instantiation within is


          Issue ID: 14425
           Summary: Indirect template instantiation within is expression
                    causes missing linker symbols
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: sludwig outerproduct.org

The following causes the linker to complain about missing
Foo!string.__xopEquals and .__xtoHash:

struct Foo(I) { I i; }
struct Bar(I) { I i; }
static assert(is(Foo!(Bar!string)));

Workaround is to explicitly instantiate the template:

alias Workaround = Foo!(Bar!string);

Apr 08 2015