In ArrayFire source code, the definition of class Array (src/backend/cuda/Array.hpp) contains:
template<typename T>
class Array {
...
operator Param<data_t<T>>() {
return Param<data_t<T>>(this->get(), this->dims().get(),
this->strides().get());
}
operator CParam<data_t<T>>() const {
return CParam<data_t<T>>(this->get(), this->dims().get(),
this->strides().get());
}
...
};
Does anyone know what is the usage of operator keyword in C++?