Forward declaration with unique_ptr? [duplicate]
It’s explicitly legal. The rule is that the types used to instantiate a template in the standard library must be complete, unless otherwise specified. In the case of unique_ptr, §20.7.1/5 says “[…] The template parameter T of unique_ptr may be an incomplete type.” There are certain operations on the pointer which require a complete type; … Read more