fork download
  1. template<typename T>
  2. struct T_visitor : public boost::static_visitor<>
  3. {
  4. T_visitor(std::vector<T>& v) : vec(v) {}
  5. template<typename U>
  6. void operator () (const U&) {}
  7. void operator () (const T& value)
  8. {
  9. vec.push_back(value);
  10. }
  11. private:
  12. std::vector<T>& vec;
  13. };
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:27: error: ‘boost’ has not been declared
prog.cpp:2:34: error: expected ‘{’ before ‘static_visitor’
prog.cpp:2:48: error: expected initializer before ‘<’ token
stdout
Standard output is empty