I am writing a software development kit and would like to use as much forward declarations as possible. One of the used classes is std::fstream, but I do not want to include <fstream> in the header files, since I do not want external includes.

However, how to use a forward declaration as the following without using the std notation ? I could use a void* as work-around, but that does not sound like a clean solution.

Qt Code:
  1. class SmallClass;
  2. //class std::fstream; is not accepted by the compiler, for obvious reasons
  3.  
  4. class Bigclass {
  5. public:
  6. ...
  7.  
  8. private:
  9. SmallClass* smallObject_;
  10. }
To copy to clipboard, switch view to plain text mode