fork download
  1. #include <string>
  2. #include <boost/signal.hpp>
  3. #include <boost/unordered_map.hpp>
  4.  
  5. #include <memory>
  6.  
  7.  
  8. class NotCopyable
  9. {
  10. public:
  11. NotCopyable(){}
  12.  
  13. NotCopyable(NotCopyable&& other) {}
  14.  
  15. private:
  16. NotCopyable(const NotCopyable& other) {}
  17. };
  18.  
  19. int main()
  20. {
  21. boost::unordered_map<std::string,std::unique_ptr<boost::signal<void()> >> f;
  22. f.find("blah");
  23. //f["blah"];
  24. //f["foo"];
  25. f.emplace("good", std::unique_ptr<boost::signal<void()> > ( new boost::signal<void()>()));
  26. //f.emplace();
  27. //f.erase("foo");
  28. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:13: error: expected ‘,’ or ‘...’ before ‘&&’ token
prog.cpp:13: error: invalid constructor; you probably meant ‘NotCopyable (const NotCopyable&)’
prog.cpp: In function ‘int main()’:
prog.cpp:21: error: ‘unique_ptr’ is not a member of ‘std’
prog.cpp:21: error: ‘unique_ptr’ is not a member of ‘std’
prog.cpp:21: error: ‘f’ was not declared in this scope
prog.cpp:21: error: template argument 2 is invalid
prog.cpp:21: error: template argument 5 is invalid
prog.cpp:25: error: ‘unique_ptr’ is not a member of ‘std’
prog.cpp:25: error: expected primary-expression before ‘>’ token
stdout
Standard output is empty