Save to a torchscript model in c++ (libtorch)

I trained a model using libtorch, and want to save it still using libtorch. And I found https://github.com/pytorch/pytorch/issues/35464, indicate that

we already have the ability to save to a std::ostream in C++

Which refer to torch::jit::Module::save() ?
And how to use it to save a torchscript model ?