Changes between Version 1 and Version 2 of Ticket #166
- Timestamp:
- May 18, 2020, 8:35:45 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #166
-
Property
Priority
changed from
minor
tomajor
-
Property
Priority
changed from
-
Ticket #166 – Description
v1 v2 32 32 }}} 33 33 34 Using a pointer, in place of a reference, may bea workaround. This version compiles properly:34 Using a pointer, in place of a reference, is often a workaround. This version compiles properly: 35 35 {{{ 36 36 ... … … 40 40 } 41 41 }}} 42 43 However, the issue prevents defining a constructor for such a generic-of-generic struct. This declaration suffers from the same error. 44 {{{ 45 forall( dtype T ) 46 void ?{}( b2(T) & ) {} 47 }}} 48 49 A workaround for the constructor problem (which may often be hard to apply) is to make the b2 parameters sized. This version compiles. 50 {{{ 51 forall( dtype T | sized(T) ) 52 struct b2 { 53 a(T) aa; 54 }; 55 56 forall( dtype T | sized(T) ) 57 void ?{}( b2(T) & ) {} 58 }}}