fork download
  1. #include <iostream>
  2. #include <memory>
  3. using namespace std;
  4.  
  5. class IArchive
  6. {
  7. public:
  8. IArchive(){}
  9. IArchive(IArchive const&) = delete;
  10. IArchive& operator=(IArchive const&) = delete;
  11. };
  12.  
  13. class ZipArchive : public IArchive
  14. {
  15. public:
  16. ZipArchive(){}
  17. ZipArchive(ZipArchive const&) = delete;
  18. ZipArchive& operator=(ZipArchive const&) = delete;
  19. };
  20.  
  21.  
  22. int main() {
  23. shared_ptr<IArchive> archive = static_pointer_cast<IArchive>(make_shared<ZipArchive>());
  24. return 0;
  25. }
Success #stdin #stdout 0s 3452KB
stdin
Standard input is empty
stdout
Standard output is empty