Assertion failure without line

Manfred Nowak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed May 20 10:39:31 PDT 2015


Adam D. Ruppe wrote:
> assert inside a mixed in string.

None praesent:

private import star, stack;
class StackExtended( T): Stack!T{
  Star!T stacked;
  this(){ stacked= new Star!T;}

  auto opOpAssign( string op, T)( T node){
    stacked+= node;
    return super+= node;
  }
  auto opUnary( string op)(){
    stacked -= super.max;
    return super--;
  }
  bool opBinaryRight( string op, Tquote)( Tquote elem)
    if( is( Tquote:T) &&( "in"==op ))
  {
    return elem in stacked;
  }
}

-manfred


More information about the Digitalmars-d-learn mailing list