# operator under C implementation in D1

Sam Hu samhu.samhu at gmail.com
Thu Mar 12 20:44:40 PDT 2009


Here I found an example form tango.io.Console class Output:
class Output
        {
                private Buffer  buffer;
                private bool    redirect;

                public  alias   append opCall;
                public  alias   flush  opCall;

                final Output append (char[] x)
                {
                        buffer.append (x.ptr, x.length);
                        return this;
                } 
...
}
On above code,
 public  alias   append opCall;
 public  alias   flush  opCall;

How can we do things like this since the opCall is the system defined?
Thanks.





More information about the Digitalmars-d-learn mailing list