Glad that I could be of help! Yes I think .to() instead of ->to() works because module is an object of a subclass of torch::nn::Module. If module were a shared_ptr to a torch::nn::Module subclass object, we would have to use ->to().
We will be making a lot of improvements to the docs (the goal is to achieve parity with Python API docs, and also easy mapping between Python API and C++ API). Please stay tuned and feel free to ask any questions here in the forum.