Custom submodules in libtorch C++

Can you show an example of using register_module with a custom module?
The only examples I’ve found online are using linear layers or convolutional layers.

I tried to write my own module and register it with another module and I couldn’t get it to work.
My IDE is telling me no instance of overloaded function "MyModel::register_module" matches the argument list -- argument types are: (const char [14], TreeEmbedding)

TreeEmbedding is the name of another struct I made which extends torch::nn::Module.

Am I missing something? An example of this would be very helpful.