Consider the following:
class DirectoryIterator; namespace detail { class FileDataProxy; class DirectoryIteratorImpl { friend class Dir
You can split your class into interface part and implementation part. The interface part is made public, and the implementation part can have public constructors. However, that means you have to use virtual inheritance.