C++ components of 3D Slicer Qt Loadable Modules (Module Overview — 3D Slicer documentation) are wrapped in python and exposed automatically (mostly). These wrapped python components will be available in Slicer and can be used by other modules.
You can also integrate the C++ code into Slicer via CLI module. It is simpler to create and maintain CLI modules, as they consists of only a single file and don’t contain any Slicer specific code. But perhaps more importantly, the code is executed in a separate process, so any errors in the code cannot make the application crash. Execution can also run in the background, keeping the application responsive during lengthy computations. These are all very important advantages. The only drawback is that you need to pass input and output data between Slicer and this process, which may be too slow for interactive use (when you need updates at dozens of times per second).
If you need faster communication between Slicer and custom C++ code than you can get with a CLI module you can also consider using the WebServer or OpenIGTLink networking options. CLI modules are started as a new process each time they run, while the networking options all back-and-forth communication for a running process.
You could also consider using C++ in Python techniques with cython. My group has a Slicer Scripted CLI (python) that contains a custom cythonized python module to speed up a specific calculation in a processing algorithm.
Yes, there’s cython and also cppyy that I find interesting, but if the goal is to provide a maintainable Slicer extension or even custom app then putting the C++ code in either a VTK or ITK class will allow you to use all the existing cross-platform deployment infrastructure without a second thought.