Changes between Version 1 and Version 2 of Ticket #166


Ignore:
Timestamp:
May 18, 2020, 8:35:45 PM (15 months ago)
Author:
mlbrooks
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #166

    • Property Priority changed from minor to major
  • Ticket #166 – Description

    v1 v2  
    3232}}}
    3333
    34 Using a pointer, in place of a reference, may be a workaround.  This version compiles properly:
     34Using a pointer, in place of a reference, is often a workaround.  This version compiles properly:
    3535{{{
    3636...
     
    4040}
    4141}}}
     42
     43However, the issue prevents defining a constructor for such a generic-of-generic struct.  This declaration suffers from the same error.
     44{{{
     45forall( dtype T )
     46void ?{}( b2(T) & ) {}
     47}}}
     48
     49A workaround for the constructor problem (which may often be hard to apply) is to make the b2 parameters sized.  This version compiles.
     50{{{
     51forall( dtype T | sized(T) )
     52struct b2 {
     53    a(T) aa;
     54};
     55
     56forall( dtype T | sized(T) )
     57void ?{}( b2(T) & ) {}
     58}}}