fork(1) download
  1. #include <set>
  2. #include <string>
  3.  
  4. struct Foo
  5. {
  6. std::string mBar;
  7. bool operator<(const Foo& rhs) const
  8. {
  9. return mBar < rhs.mBar;
  10. }
  11. Foo(const std::string bar) : mBar(bar) {};
  12. };
  13.  
  14. typedef std::set<Foo> Foos;
  15.  
  16. int main()
  17. {
  18. Foos foos;
  19. foos.emplace(std::string("Hello"));
  20. }
  21.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:19:10: error: ‘Foos’ has no member named ‘emplace’
stdout
Standard output is empty