This is simply not possible. You cannot forward declare a nested structure outside the container. You can only forward declare it within the container.
You'll need to do one of the following
- Make the class non-nested
- Change your declaration order so that the nested class is fully defined first
- Create a common base class that can be both used in the function and implemented by the nested class.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…