template<typename T>struct T_visitor : public boost::static_visitor<>{ T_visitor(std::vector<T>& v) : vec(v) {} template<typename U> void operator () (const U&) {} void operator () (const T& value) { vec.push_back(value); }private: std::vector<T>& vec;};
Standard input is empty
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
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!