Heap-free pimpl. Incorrect or superstition?
问题 I am aspiring to separate interface from implementation. This is primarily to protect code using a library from changes in the implementation of said library, though reduced compilation times are certainly welcome. The standard solution to this is the pointer to implementation idiom, most likely to be implemented by using a unique_ptr and carefully defining the class destructor out of line, with the implementation. Inevitably this raises concerns about heap allocation. I am familiar with