code_junkie

Why can't I store boost::function in std::list?

Nov 12th, 2011
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. error: expected `;' before 'it'"
  2.  
  3. #include <boost/function.hpp>
  4. #include <list>
  5.  
  6. template< class T >
  7. void example() {
  8. std::list< boost::function<T ()> >::iterator it;
  9. }
  10.  
  11. template< class T >
  12. void example() {
  13. typename std::list< boost::function<T ()> >::iterator it;
  14. }
  15.  
  16. std::list< boost::function<T ()> >::iterator * it;
Add Comment
Please, Sign In to add comment