[dmd-beta] dmd 1.074 and 2.059 beta 5

Walter Bright walter at digitalmars.com
Thu Apr 12 14:06:07 PDT 2012


You may be able to break the circle by adding a specialization of closureOf for 
BasicVector.

On 4/11/2012 8:02 PM, David Simcha wrote:
> Ok, but I downloaded the new beta and changed closureOf to:
>
> template closureOf( T ) {
>     static if( isScalar!(Unqual!T) ) {
>         enum closureOf = Closure.Scalar;
>     } else {
>         enum closureOf = T.closure;
>     }
> }
>
> where isScalar is defined as:
>
> template isScalar( T ) {
>     enum isScalar = !is( T == class ) &&
>         is( typeof((){
>             T x;// = MinusOne!T;
>             T y = x;
>             T z;
>
>             if( x == x || x != x ) {
>                 x = x;
>                 x += x; x -= x; x /= x; x *= x;
>                 x = x + x; x = x - x; x = x / x;
>             }
>         }()) );
> }
>
>
> It still gives a "possible circular dependency" error message.  Any clue why?
>


More information about the dmd-beta mailing list