I want to use ** to overload the exponent function. I work if I use something like "^", but the python method is **, and I would like to use this with swift. Any way to do this?
Error: operator implementation with declaration of conformance operator
@infix func ** (num: Double, power: Double) -> Double{ return pow(num, power) } println(8.0**3.0) // Does not work
source share