It is inconvenient to use more C ++. The most important thing is the c ++ class declaration.
Sometimes we want to develop interfaces, but keep data and internal functions internally, rather than header files.
Another purpose of doing so is that if internal data is written in a structure that is not intended to be disclosed, I don't have to worry about encapsulating it.
Another benefit is that if there is an automatic generationCodeTo isolate the automatically generated code from the code that the user needs to modify.
However, splitting the class declaration also has many problems. The most important thing is that the class size cannot be obtained from the first file. In this way, C ++ is required to support the ability to dynamically obtain the class size, so as to correctly allocate space for the class instance.
Hope that the experts can propose solutions to this problem.