I am rewriting my own native Windows C ++ library (a constant effort since 2002) with a public release. Over the past 10 years, I have been the sole beneficiary of these 150+ KLOCs, and I feel that others can find good use for this.
Currently, the entire library is pretty boilerplate and just a title. This means that all the code is in the body of the classes. It is not very easy to manage, but it is normal.
I am very tempted to read a few tutorials on coding C ++ libraries to break it down into .hpp + .inl . Experimentally done for several classes, and this improves readability and makes it easier for others to engage. I know where everything is at any moment. But other users may need a brief overview of class declarations ... and definition only if necessary (debugging).
Question :
What are the pros and cons of separating member definitions from a class definition for a class template? There is a common practice.
This is important to me because it is a one-way road. I cannot reorganize it otherwise, so any feedback matters ...
source share